Add workaround for horizon image upload issue 39/58739/1
authorHarry Huang <huangxiangyu5@huawei.com>
Wed, 20 Jun 2018 04:13:14 +0000 (12:13 +0800)
committerHarry Huang <huangxiangyu5@huawei.com>
Wed, 20 Jun 2018 04:20:18 +0000 (12:20 +0800)
Change-Id: I1ddf4d4c8c57c26d6948c69a60507f35f25e57ff
Signed-off-by: Harry Huang <huangxiangyu5@huawei.com>
deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml
deploy/adapters/ansible/roles/post-openstack/tasks/main.yml

index c25cd45..902369a 100644 (file)
@@ -98,6 +98,7 @@
 - hosts:
     - utility_all[0]
     - network_hosts[0]
+    - horizon
   remote_user: root
   roles:
     - post-openstack
index fb0dc67..2c404b8 100644 (file)
     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']