diff options
| author | Jenkins <jenkins@review.openstack.org> | 2015-09-25 13:50:41 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2015-09-25 13:50:41 +0000 |
| commit | 6cf67a05e1ba0e155fb4a40692dd24211ee790b4 (patch) | |
| tree | cf791b6a8c5e77215cbe1a67705472b8f45ececf /ansible | |
| parent | 00f35e55907d54bacd291ebaab684d7b26420c37 (diff) | |
| parent | 4d5186473ec0ed8b350052049f38f969644f36d5 (diff) | |
| download | kolla-6cf67a05e1ba0e155fb4a40692dd24211ee790b4.tar.gz kolla-6cf67a05e1ba0e155fb4a40692dd24211ee790b4.zip | |
Merge "Replace config-external - horizon"
Diffstat (limited to 'ansible')
| -rw-r--r-- | ansible/roles/horizon/tasks/config.yml | 5 | ||||
| -rw-r--r-- | ansible/roles/horizon/tasks/start.yml | 2 | ||||
| -rw-r--r-- | ansible/roles/horizon/templates/horizon.json.j2 | 20 |
3 files changed, 26 insertions, 1 deletions
diff --git a/ansible/roles/horizon/tasks/config.yml b/ansible/roles/horizon/tasks/config.yml index b74c5aa8e..87ce2976e 100644 --- a/ansible/roles/horizon/tasks/config.yml +++ b/ansible/roles/horizon/tasks/config.yml @@ -5,6 +5,11 @@ state: "directory" recurse: "yes" +- name: Copying horizon JSON configuration file + template: + src: "horizon.json.j2" + dest: "{{ node_config_directory }}/horizon/config.json" + - name: Copying over config(s) template: src: "horizon.conf.j2" diff --git a/ansible/roles/horizon/tasks/start.yml b/ansible/roles/horizon/tasks/start.yml index ff6adfdf6..3856050a3 100644 --- a/ansible/roles/horizon/tasks/start.yml +++ b/ansible/roles/horizon/tasks/start.yml @@ -13,7 +13,7 @@ insecure_registry: "{{ docker_insecure_registry }}" name: horizon image: "{{ horizon_image_full }}" - volumes: "{{ node_config_directory }}/horizon/:/opt/kolla/horizon/:ro" + volumes: "{{ node_config_directory }}/horizon/:/opt/kolla/config_files/:ro" env: KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" when: inventory_hostname in groups['horizon'] diff --git a/ansible/roles/horizon/templates/horizon.json.j2 b/ansible/roles/horizon/templates/horizon.json.j2 new file mode 100644 index 000000000..a3bdef0d1 --- /dev/null +++ b/ansible/roles/horizon/templates/horizon.json.j2 @@ -0,0 +1,20 @@ +{% set apache_cmd = 'apache2' if kolla_base_distro in ['ubuntu', 'debian'] else 'httpd' %} +{% set apache_dir = 'apache2/conf-enabled' if kolla_base_distro in ['ubuntu', 'debian'] else 'httpd/conf.d' %} +{% set apache_file = '000-default.conf' if kolla_base_distro in ['ubuntu', 'debian'] else 'horizon.conf' %} +{ + "command": "/usr/sbin/{{ apache_cmd }} -DFOREGROUND", + "config_files": [ + { + "source": "/opt/kolla/config_files/horizon.conf", + "dest": "/etc/{{ apache_dir }}/{{ apache_file }}", + "owner": "horizon", + "perm": "0644" + }, + { + "source": "/opt/kolla/config_files/local_settings", + "dest": "/etc/openstack-dashboard/local_settings", + "owner": "horizon", + "perm": "0644" + } + ] +} |
