playbook-base/local.yaml

25 lines
748 B
YAML
Raw Normal View History

2018-09-06 10:48:00 -04:00
---
2018-09-06 11:00:07 -04:00
- hosts: all
2018-09-06 14:21:54 -04:00
become: true
2018-09-05 19:06:00 -04:00
tasks:
2018-09-06 10:48:00 -04:00
- name: Installs fail2ban
apt: pkg=fail2ban state=installed update_cache=true
2018-09-06 12:37:26 -04:00
- name: download allow file
get_url:
url: https://git.aanetworks.org/ariel/playbook-base/src/branch/master/static_files/hosts.allow
dest: /tmp/hosts.allow
- name: downlod deny file
get_url:
url: https://git.aanetworks.org/ariel/playbook-base/src/branch/master/static_files/hosts.deny
dest: /tmp/hosts.deny
2018-09-06 12:09:42 -04:00
2018-09-06 10:48:00 -04:00
2018-09-06 11:14:59 -04:00
- name: Hosts file Deny
2018-09-06 12:37:26 -04:00
copy: src=/tmp/hosts.deny dest=/etc/hosts.deny
2018-09-06 11:14:59 -04:00
- name: Hosts file Allow
2018-09-06 12:37:26 -04:00
copy: src=/tmp/hosts.allow dest=/etc/hosts.allow
2018-09-06 11:14:59 -04:00
2018-09-06 10:48:00 -04:00
handlers:
- name: start fail2ban
2018-09-06 11:14:59 -04:00
service: name=fail2ban state=started