2022-03-13 22:31:02 +01:00
|
|
|
---
|
2024-04-09 20:21:59 +02:00
|
|
|
|
2022-03-13 22:31:02 +01:00
|
|
|
- name: Install fail2ban
|
|
|
|
become: true
|
2022-12-16 20:12:49 +01:00
|
|
|
ansible.builtin.apt:
|
2022-03-13 22:31:02 +01:00
|
|
|
name: fail2ban
|
|
|
|
state: present
|
|
|
|
|
|
|
|
- name: Configure fail2ban for nftables
|
|
|
|
become: true
|
2022-12-16 20:12:49 +01:00
|
|
|
ansible.builtin.copy:
|
2022-03-13 22:31:02 +01:00
|
|
|
src: 00-banactions-nft.conf
|
|
|
|
dest: /etc/fail2ban/jail.d/00-banactions-nft.conf
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
|
|
|
notify: Restart fail2ban service
|