Matteo Scandolo | 3896c47 | 2017-08-01 13:31:42 -0700 | [diff] [blame] | 1 | |
| 2 | # Copyright 2017-present Open Networking Foundation |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | |
| 16 | |
Zack Williams | 275e48b | 2017-03-24 12:16:00 -0700 | [diff] [blame] | 17 | --- |
| 18 | # apache-proxy/tasks/main.yml |
| 19 | |
| 20 | - name: Install Apache |
| 21 | apt: |
| 22 | name: "{{ item }}" |
| 23 | update_cache: yes |
| 24 | cache_valid_time: 3600 |
| 25 | with_items: |
| 26 | - apache2 |
| 27 | - apache2-utils |
| 28 | |
| 29 | - name: Enable Apache2 Modules |
| 30 | apache2_module: |
| 31 | name: "{{ item }}" |
| 32 | notify: reload apache2 |
| 33 | with_items: |
| 34 | - proxy |
| 35 | - proxy_http |
| 36 | - proxy_wstunnel |
| 37 | - rewrite |
| 38 | - headers |
| 39 | |
| 40 | - name: Apache configuration for CORD sites |
| 41 | copy: |
| 42 | src: files/cord-http.conf |
| 43 | dest: /etc/apache2/conf-available/cord-http.conf |
| 44 | owner: root |
| 45 | group: root |
| 46 | mode: 0644 |
| 47 | notify: reload apache2 |
| 48 | |
| 49 | - name: Enable CORD Apache Configuration |
| 50 | command: a2enconf cord-http |
| 51 | register: en_cord_http |
| 52 | changed_when: en_cord_http.stdout.find('already enabled') == -1 |
| 53 | notify: reload apache2 |
| 54 | |