2018-09-06 10:48:00 -04:00
|
|
|
---
|
2018-09-06 14:34:06 -04:00
|
|
|
- name: Base config
|
|
|
|
hosts: all
|
2018-09-06 15:13:04 -04:00
|
|
|
become: true
|
|
|
|
become_method: sudo
|
2018-09-05 19:06:00 -04:00
|
|
|
tasks:
|
2018-09-06 12:37:26 -04:00
|
|
|
|
|
|
|
- name: download allow file
|
|
|
|
get_url:
|
2018-09-06 15:27:13 -04:00
|
|
|
url: https://git.aanetworks.org/ariel/playbook-base/raw/branch/master/static_files/hosts.allow
|
|
|
|
dest: /etc/hosts.allow
|
2018-09-06 15:52:14 -04:00
|
|
|
force: yes
|
2018-09-06 16:11:00 -04:00
|
|
|
- name: download deny file
|
2018-09-06 12:37:26 -04:00
|
|
|
get_url:
|
2018-09-06 15:27:13 -04:00
|
|
|
url: https://git.aanetworks.org/ariel/playbook-base/raw/branch/master/static_files/hosts.deny
|
|
|
|
dest: /etc/hosts.deny
|
2018-09-06 15:52:14 -04:00
|
|
|
force: yes
|
2018-09-06 16:11:00 -04:00
|
|
|
|
|
|
|
- name: download resolv file
|
|
|
|
get_url:
|
|
|
|
url: https://git.aanetworks.org/ariel/playbook-base/raw/branch/master/static_files/resolv.conf
|
|
|
|
dest: /etc/resolv.conf
|
|
|
|
force: yes
|
|
|
|
|
2018-09-06 16:28:02 -04:00
|
|
|
- name: Installs fail2ban
|
2020-05-15 12:25:11 -04:00
|
|
|
apt: pkg=fail2ban state=present update_cache=true
|
2018-09-06 16:28:02 -04:00
|
|
|
|
2020-05-16 22:01:59 -04:00
|
|
|
- name: Ensure NTP is installed
|
|
|
|
apt: name=ntp state=present
|
|
|
|
- name: Ensure is running
|
|
|
|
systemd: name=ntp state=started enabled=yes
|
|
|
|
|
2018-09-06 10:48:00 -04:00
|
|
|
handlers:
|
|
|
|
- name: start fail2ban
|
2018-09-06 15:52:14 -04:00
|
|
|
service: name=fail2ban state=started
|
2020-05-15 11:46:29 -04:00
|
|
|
|