From 1204730924436ef9e1c7c49c9557837f9a5ed0e8 Mon Sep 17 00:00:00 2001 From: clarkzjw Date: Wed, 8 Feb 2023 00:40:09 -0800 Subject: fork https://github.com/mattsta/mailweb --- ansible/roles/fail2ban/tasks/main.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 ansible/roles/fail2ban/tasks/main.yml (limited to 'ansible/roles/fail2ban/tasks') diff --git a/ansible/roles/fail2ban/tasks/main.yml b/ansible/roles/fail2ban/tasks/main.yml new file mode 100644 index 0000000..6d8e237 --- /dev/null +++ b/ansible/roles/fail2ban/tasks/main.yml @@ -0,0 +1,28 @@ +--- +# dovecot is configured to respect the fail2ban deny decisions +# A failed login is recorded as: +# dovecot[]: imap-login: access(tcpwrap): Client refused (rip=) +- name: install fail2ban + apt: + name: fail2ban + state: latest + install_recommends: false + +- name: copy fail2ban config + copy: + src: fail2ban/ + dest: /etc/fail2ban/ + mode: preserve + notify: + - restart fail2ban + + +# verify everything is running +- name: verify services are running in dependency order + service: + name: "{{ item }}" + enabled: yes + state: started + loop: + - fail2ban + -- cgit v1.2.3