-
Notifications
You must be signed in to change notification settings - Fork 0
/
playbook.yml
42 lines (33 loc) · 1.07 KB
/
playbook.yml
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
31
32
33
34
35
36
37
38
39
40
41
42
---
- name: appserver setup
hosts: appservers
tasks:
- name: ensure tomcat7 is at latest version
apt: name=tomcat7 update_cache=yes state=latest
sudo: yes
- name: ensure tomcat7 is running (and enable it at boot)
service: name=tomcat7 state=started enabled=yes
sudo: yes
- name: rproxy setup
hosts: rproxy
tasks:
- name: ensure apache is at the latest version
apt: name=apache2 update_cache=yes state=latest
sudo: yes
- name: ensure apache is running (and enable it at boot)
service: name=apache2 state=started enabled=yes
sudo: yes
- name: enable proxy module
command: a2enmod proxy proxy_http
sudo: yes
- name: create app-proxy vhost configuration
template: src=app-proxy.conf.j2 dest=/etc/apache2/sites-available/app-proxy.conf owner=root group=root mode=0640
sudo: yes
- name: enable app-proxy vhost
command: a2ensite app-proxy
sudo: yes
notify: reload apache2
handlers:
- name: reload apache2
service: name=apache2 state=reloaded
sudo: yes