18 lines
343 B
YAML
18 lines
343 B
YAML
|
---
|
||
|
- name: Install fail2ban
|
||
|
become: true
|
||
|
apt:
|
||
|
name: fail2ban
|
||
|
state: present
|
||
|
update_cache: yes
|
||
|
|
||
|
- name: Configure fail2ban for nftables
|
||
|
become: true
|
||
|
copy:
|
||
|
src: 00-banactions-nft.conf
|
||
|
dest: /etc/fail2ban/jail.d/00-banactions-nft.conf
|
||
|
owner: root
|
||
|
group: root
|
||
|
mode: 0644
|
||
|
notify: Restart fail2ban service
|