-
Notifications
You must be signed in to change notification settings - Fork 7
/
playbook.yml
50 lines (45 loc) · 1.16 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
43
44
45
46
47
48
49
50
---
#Provision Droplets
#- include: droplets.yml
# Common tasks
- hosts: all
gather_facts: True
sudo: yes
roles:
- { role: common, tags: ["common"] }
- { role: openssh, tags: ["openssh"] }
- { role: fail2ban, tags: ["fail2ban"] }
- { role: rkhunter, tags: ["rkhunter"] }
- { role: iptables, tags: ["iptables"] }
# Load Balancer(s) roles
- hosts: lbs
sudo: yes
roles:
- { role: haproxy, tags: ["haproxy"] }
# Application Server(s) roles
- hosts: apps
sudo: yes
roles:
- { role: nginx, tags: ["nginx"] }
- { role: php5, tags: ["php5"] }
- { role: hhvm, tags: ["hhvm"] }
# Database Server(s) roles
- hosts: dbs
sudo: yes
vars_files:
- group_vars/passwords.yml
roles:
- { role: mysql, tags: ["mysql"] }
# Installing the application on servers
- hosts: all
sudo: yes
vars_files:
- group_vars/passwords.yml
handlers:
- include: roles/hhvm/handlers/main.yml
- include: roles/nginx/handlers/main.yml
- include: roles/mysql/handlers/main.yml
- include: roles/haproxy/handlers/main.yml
roles:
- { role: application, tags: ["application"] }
- { role: backup, tags: ["backup"] }