Initial commit

This commit is contained in:
Julian Rother 2025-01-15 19:46:51 +01:00
commit 1f22db68e1
Signed by: julian
GPG key ID: C19B924C0CD13341
5 changed files with 54 additions and 0 deletions

30
tasks/main.yml Normal file
View file

@ -0,0 +1,30 @@
- name: Install fail2ban
ansible.builtin.apt:
pkg: fail2ban
- name: Copy fail2ban config
ansible.builtin.template:
src: fail2ban.local.j2
dest: /etc/fail2ban/fail2ban.local
owner: root
group: root
mode: 0644
notify: Restart fail2ban
- name: Copy jail config
ansible.builtin.template:
src: jail.local.j2
dest: /etc/fail2ban/jail.local
owner: root
group: root
mode: 0644
notify: Restart fail2ban
- name: Clear debian default jail config
ansible.builtin.copy:
content: ''
dest: /etc/fail2ban/jail.d/defaults-debian.conf
owner: root
group: root
mode: 0644
notify: Restart fail2ban