playbook-base/local.yaml

22 lines
619 B
YAML

---
- hosts: all
- become: true
tasks:
- name: Installs fail2ban
apt: pkg=fail2ban state=installed update_cache=true
- name: clone repo to target
git:
repo: gitea@git.aanetworks.org:ariel/playbook-base.git
version: master
dest: /tmp/basefiles
accept_hostkey: yes
- name: Hosts file Deny
copy: src=/tmp/basefiles/static_files/hosts.deny dest=/etc/hosts.deny
- name: Hosts file Allow
copy: src=/tmp/basefiles/static_files/hosts.allow dest=/etc/hosts.allow
handlers:
- name: start fail2ban
service: name=fail2ban state=started