31 lines
874 B
YAML
31 lines
874 B
YAML
---
|
|
- name: Base config
|
|
hosts: all
|
|
become: true
|
|
become_method: sudo
|
|
tasks:
|
|
|
|
- name: download allow file
|
|
get_url:
|
|
url: https://git.aanetworks.org/ariel/playbook-base/raw/branch/master/static_files/hosts.allow
|
|
dest: /etc/hosts.allow
|
|
force: yes
|
|
- name: download deny file
|
|
get_url:
|
|
url: https://git.aanetworks.org/ariel/playbook-base/raw/branch/master/static_files/hosts.deny
|
|
dest: /etc/hosts.deny
|
|
force: yes
|
|
|
|
- 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
|
|
|
|
- name: Installs fail2ban
|
|
apt: pkg=fail2ban state=installed update_cache=true
|
|
|
|
handlers:
|
|
- name: start fail2ban
|
|
service: name=fail2ban state=started
|
|
|