forked from mgcrea/ansible-web-playbooks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
playbook.yml
89 lines (84 loc) · 2.17 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
---
# File: playbook.yml
# Type: playbook
# @cli vagrant destroy; vagrant up; rm -rf fetched/*
# @cli ansible-playbook -i vagrant_inventory playbook.yml
- name: Set global facts
hosts: all
tags: always
tasks:
- set_fact: docker={{ ansible_virtualization_type is defined and ansible_virtualization_type == 'docker' and ansible_virtualization_role == 'guest' }}
- set_fact: ansible_fetched_base=fetched/{{ group_names[0] | default('') }}/{{ inventory_hostname }}
- name: Ansible bootstrap
hosts: all
sudo: yes
tags: apt_update
tasks:
- name: Setup | Update aptitude
apt: update_cache=yes cache_valid_time=3600
- name: Ansible setup
hosts: all
sudo: yes
roles:
- role: ansible/setup
tags: ansible
- name: Fetch facts
hosts: all
sudo: yes
roles:
- role: ansible/facts
tags: ansible_facts
- name: Execute playbook
# connection: fireball
# accelerate: true
hosts: all
sudo: yes
roles:
- role: system/docker
tags: system_docker
- role: system/boot
tags: system_boot
- role: system/sudo
tags: system_sudo
- role: system/ssh
tags: system_ssh
- role: system/apt
tags: system_apt
- role: system/ufw
tags: system_ufw
- role: system/ntp
tags: system_ntp
- role: system/fail2ban
tags: system_fail2ban
- role: system/clamav
tags: system_clamav
- role: system/apcups
tags: system_apcups
- role: database/beanstalkd
tags: database_beanstalkd
- role: database/mysql
tags: database_mysql
- role: database/mongodb
tags: database_mongodb
- role: database/redis
tags: database_redis
- role: web/apache2
tags: web_apache2
- role: web/nginx
tags: web_nginx
- role: web/nodejs
tags: web_nodejs
- role: web/php5
tags: web_php5
- role: web/varnish
tags: web_varnish
- role: networking/transmission
tags: networking_transmission
- role: networking/openvpn
tags: networking_openvpn
- role: networking/avahi
tags: networking_avahi
- role: networking/btsync
tags: networking_btsync
- role: networking/cntlm
tags: networking_cntlm