blob: f4121d87badf5afc57f2b725196d5f1d283c22e3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
---
- name: "Configure apache vhost"
template:
src: ../templates/01_openbook.conf
dest: /etc/apache2/sites-available
mode: 0644
owner: root
group: root
register: vhost_result
- name: "Configure apache modules"
shell: |
a2enmod headers
a2enmod proxy
a2enmod proxy_http
a2enmod socache_shmcb
a2enmod redirect
a2enmod ssl
a2dissite 000-default.conf
a2dissite default-ssl.conf
rm /etc/apache2/sites-available/000-default.conf
rm /etc/apache2/sites-available/default-ssl.conf
a2ensite 01_openbook.conf
when: vhost_result["changed"] == True
- include: apache-ctl.yaml action=restart
when: vhost_result["changed"] == True
- include: apache-ctl.yaml action=start
when: vhost_result["changed"] == False
|