17 lines
376 B
YAML
17 lines
376 B
YAML
---
|
|
- name: Install fail2ban
|
|
become: true
|
|
ansible.builtin.apt:
|
|
name: fail2ban
|
|
state: present
|
|
update_cache: true
|
|
|
|
- name: Configure fail2ban for nftables
|
|
become: true
|
|
ansible.builtin.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
|