-
Notifications
You must be signed in to change notification settings - Fork 28
/
manage.yml
37 lines (30 loc) · 903 Bytes
/
manage.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
# Ansible has some dependencies: http://docs.ansible.com/ansible/intro_installation.html
# Detect if the client has python-apt. If not, install all listed dependencies.
- name: Install Ansible Dependencies
hosts: ubuntu
remote_user: root
gather_facts: no
pre_tasks:
- raw: if [ 1 -gt $(grep -c 'install ok installed' <<< `dpkg -s python-apt`) ]; then apt-get update; apt-get -y install python-simplejson python-apt; fi;
###
### End Ansible Dependencies
- name: apply common configuration to all nodes
hosts: ubuntu
remote_user: root
roles:
- common
- sudo
- swapfile
- unattended-upgrades
- name: deploy Stoutsopenvpn OpenVPN role
hosts: Stoutsopenvpn
remote_user: root
roles:
- iptables-openvpn
- Stoutsopenvpn
- makeovpn
- name: check restart status and restart if required
hosts: ubuntu
remote_user: root
roles:
- rebooter