From: Justin chi Date: Wed, 16 Dec 2015 08:23:26 +0000 (+0000) Subject: Merge "fix dashboard bug" X-Git-Tag: brahmaputra.1.0~122 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=3e93329b962a85147ccbce77a19ad4b3b93af51a;p=compass4nfv.git Merge "fix dashboard bug" --- 3e93329b962a85147ccbce77a19ad4b3b93af51a diff --cc deploy/adapters/ansible/roles/dashboard/tasks/main.yml index 52318d42,54e48c25..86b4f93d --- a/deploy/adapters/ansible/roles/dashboard/tasks/main.yml +++ b/deploy/adapters/ansible/roles/dashboard/tasks/main.yml @@@ -21,10 -18,30 +21,25 @@@ - name: remove ubuntu theme action: "{{ ansible_pkg_mgr }} name=openstack-dashboard-ubuntu-theme state=absent" -- name: update memcached conf - lineinfile: dest=/etc/memcached.conf state=present - regexp="-l *" - line="-l {{ internal_vip.ip }}" - - name: update ubuntu horizon settings - template: src=local_settings_debian - dest=/etc/openstack-dashboard/local_settings.py - backup=yes + lineinfile: + dest: /etc/openstack-dashboard/local_settings.py + regexp: '{{ item.regexp }}' + line: '{{ item.line }}' + with_items: + - regexp: '^WEBROOT[ \t]*=.*' + line: 'WEBROOT = "/horizon"' + - regexp: '^COMPRESS_OFFLINE[ \t]*=.*' + line: 'COMPRESS_OFFLINE=True' + - regexp: '^ALLOWED_HOSTS[ \t]*=.*' + line: 'ALLOWED_HOSTS = ["*"]' + - regexp: '^OPENSTACK_HOST[ \t]*=.*' + line: 'OPENSTACK_HOST = "{{ internal_ip }}"' + when: ansible_os_family == 'Debian' + + - name: precompile horizon css + shell: /usr/bin/python /usr/share/openstack-dashboard/manage.py compress --force + ignore_errors: True when: ansible_os_family == 'Debian' - name: update redhat version horizon settings