aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarry Huang <huangxiangyu5@huawei.com>2018-06-20 12:13:14 +0800
committerHarry Huang <huangxiangyu5@huawei.com>2018-06-20 12:20:18 +0800
commitc337890b9debe304015ac8fba348b7b762beb49c (patch)
tree4202def1dced237912f2c18d6026bcb42bf70455
parent03346d4b1be34b3d1e0db69aa9eb86d4e858e42f (diff)
Add workaround for horizon image upload issue
Change-Id: I1ddf4d4c8c57c26d6948c69a60507f35f25e57ff Signed-off-by: Harry Huang <huangxiangyu5@huawei.com>
-rw-r--r--deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml1
-rw-r--r--deploy/adapters/ansible/roles/post-openstack/tasks/main.yml17
2 files changed, 18 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml b/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml
index c25cd45..902369a 100644
--- a/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml
+++ b/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml
@@ -98,6 +98,7 @@
- hosts:
- utility_all[0]
- network_hosts[0]
+ - horizon
remote_user: root
roles:
- post-openstack
diff --git a/deploy/adapters/ansible/roles/post-openstack/tasks/main.yml b/deploy/adapters/ansible/roles/post-openstack/tasks/main.yml
index fb0dc67..2c404b8 100644
--- a/deploy/adapters/ansible/roles/post-openstack/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/post-openstack/tasks/main.yml
@@ -69,3 +69,20 @@
flat: "yes"
when:
- inventory_hostname == groups['network_hosts'][0]
+
+# yamllint disable rule:line-length
+- name: fix horizon upload image issue
+ lineinfile:
+ dest: "/openstack/venvs/horizon-15.1.4/lib/python2.7/site-packages/openstack_dashboard/local/local_settings.py"
+ regexp: "^HORIZON_IMAGES_UPLOAD_MODE"
+ line: "HORIZON_IMAGES_UPLOAD_MODE = 'legacy'"
+ when:
+ - inventory_hostname in groups['horizon']
+# yamllint enable rule:line-length
+
+- name: restart apache2
+ service:
+ name: apache2
+ state: restarted
+ when:
+ - inventory_hostname in groups['horizon']