David K. Bainbridge | 49b75ef | 2016-08-24 15:24:15 -0700 | [diff] [blame] | 1 | --- |
| 2 | |
| 3 | # If using a MAAS based POD deployment then copy over an apache configuration |
| 4 | # that forwards to the various UIs |
| 5 | - name: Ensure CORD Apache Configuration |
| 6 | become: yes |
| 7 | copy: |
| 8 | src: files/cord-http.conf |
| 9 | dest: /etc/apache2/conf-available/cord-http.conf |
| 10 | owner: root |
| 11 | group: root |
| 12 | mode: 0644 |
| 13 | notify: reload apache2 |
| 14 | when: on_maas |
| 15 | |
| 16 | - name: Ensure Modules |
| 17 | become: yes |
| 18 | command: a2enmod {{ item }} |
| 19 | register: mod_proxy |
| 20 | changed_when: mod_proxy.stdout.find('already enabled') == -1 |
| 21 | notify: reload apache2 |
| 22 | when: on_maas |
| 23 | with_items: |
| 24 | - proxy |
| 25 | - proxy_http |
| 26 | - proxy_wstunnel |
| 27 | - rewrite |
David K. Bainbridge | d1fed7f | 2016-08-29 08:21:14 -0700 | [diff] [blame] | 28 | - headers |
David K. Bainbridge | 49b75ef | 2016-08-24 15:24:15 -0700 | [diff] [blame] | 29 | |
| 30 | - name: Enable CORD Apache Configuration |
| 31 | become: yes |
| 32 | command: a2enconf cord-http |
| 33 | register: en_cord_http |
| 34 | changed_when: en_cord_http.stdout.find('already enabled') == -1 |
| 35 | notify: reload apache2 |
| 36 | when: on_maas |