-
Notifications
You must be signed in to change notification settings - Fork 6
/
install.yml
39 lines (31 loc) · 1001 Bytes
/
install.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
---
- name: Install Underpass
hosts: control
become: true
vars_files:
- "./ansible/vars/vars.yml"
roles:
- role: geerlingguy.docker
tags: [ 'install-docker' ]
tasks:
- include_tasks: ./ansible/playbooks/setup-centos.yml
when: ansible_distribution == 'CentOS' and ansible_distribution_major_version == '7'
tags: [ 'playbook-centos' ]
- include_tasks: ./ansible/playbooks/setup-debian.yml
when: ansible_distribution == 'Debian' and ansible_distribution_major_version == '10'
tags: [ 'playbook-debian' ]
- include_tasks: ./ansible/playbooks/setup-ubuntu.yml
when: ansible_distribution == 'Ubuntu'
tags: [ 'playbook-ubuntu' ]
- include: ./ansible/playbooks/control.yml
tags: [ 'playbook-control' ]
handlers:
- name: Restart fail2ban
service:
name: fail2ban
state: restarted
- name: Start fail2ban
service:
name: fail2ban
state: started
enabled: yes