Compress static files after customizations

The previous behavior compressed files, then customized the horizon
install. By doing this, static files in the customization modules were
left out of the static collection/compression process. This change in
ordering will now catch those files.

Additionally, a notification is sent to the apache restart handler.

Change-Id: I5c6678c2ef93b46f38cf94f19c9b2cf444411ea8
Closes-Bug: #1598146
This commit is contained in:
Nolan Brubaker 2016-07-06 11:28:25 -04:00
parent 6a84a06a79
commit dfda6bc078
2 changed files with 18 additions and 12 deletions

View File

@ -0,0 +1,5 @@
---
fixes:
- The standard collectstatic and compression process in the os_horizon role
now happens after horizon customizations are installed, so that all static
resources will be collected and compressed.

View File

@ -77,18 +77,6 @@
tags:
- horizon-configs
- name: Collect and compress static files
command: "{{ item }}"
become: yes
become_user: "{{ horizon_system_user_name }}"
with_items:
- "{{ horizon_bin }}/horizon-manage.py collectstatic --noinput"
- "{{ horizon_bin }}/horizon-manage.py compress --force"
tags:
- horizon-configs
- horizon-static-collect
- horizon-command-bin
- name: Setup Horizon config(s)
template:
src: "{{ item.src }}"
@ -124,3 +112,16 @@
when: horizon_customization_module is defined
tags:
- horizon-configs
- name: Collect and compress static files
command: "{{ item }}"
become: yes
become_user: "{{ horizon_system_user_name }}"
with_items:
- "{{ horizon_bin }}/horizon-manage.py collectstatic --noinput"
- "{{ horizon_bin }}/horizon-manage.py compress --force"
notify: Restart apache2
tags:
- horizon-configs
- horizon-static-collect
- horizon-command-bin