--- # Copyright 2014, Rackspace US, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # The Horizon config files should be replaced for the JUNO release # juno_revision: true - name: Setup Horizon config(s) template: src: "{{ item.src }}" dest: "{{ item.dest }}" owner: "{{ system_user }}" group: "{{ system_group }}" mode: "{{ item.mode }}" with_items: - { src: "local_settings.py", dest: "/etc/horizon/local_settings.py", mode: "0644" } - name: Copy manage.py to /usr/local/bin/horizon-manage.py command: rsync -ci {{ git_dest }}/manage.py /usr/local/bin/horizon-manage.py register: rsync_result changed_when: rsync_result.stdout != "" - name: Set permissions on /usr/local/bin/horizon-manage.py file: path: /usr/local/bin/horizon-manage.py owner: root group: root mode: 0755 - name: Remove old links deployed in RPC 9.0.0 file: path={{ item }} state=absent with_items: - "{{ install_lib_dir }}/openstack_dashboard/static/bootstrap/js" - "{{ install_lib_dir }}/openstack_dashboard/static/horizon" # /opt/horizon/lib/python2.7/site-packages/manage.py - name: Collect and compress static files command: "{{ item }}" sudo: yes sudo_user: "{{ system_user }}" with_items: - horizon-manage.py collectstatic --noinput - horizon-manage.py compress --force - name: Create horizon links file: src: "{{ item.src }}" dest: "{{ item.dest }}" owner: "{{ system_user }}" group: "{{ system_group }}" state: "link" with_items: - { src: "/etc/horizon/local_settings.py", dest: "{{ install_lib_dir }}/openstack_dashboard/local/local_settings.py" }