24 lines
663 B
YAML
24 lines
663 B
YAML
---
|
|
- name: Base config
|
|
hosts: all
|
|
become: true
|
|
become_method: sudo
|
|
tasks:
|
|
- name: Installs fail2ban
|
|
apt: pkg=fail2ban state=installed update_cache=true
|
|
|
|
- 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: downlod 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
|
|
|
|
handlers:
|
|
- name: start fail2ban
|
|
service: name=fail2ban state=started
|
|
|