- log to journald via fail2ban.local (logtarget is a fail2ban.conf option, not jail.local) so the server can start without /var/log write access - create the socket dir via RuntimeDirectory=fail2ban instead of a non-creating ReadWritePaths entry - add ufw write paths so bans persist under the read-only namespace - manage override.conf unconditionally and restart on change
7 lines
120 B
YAML
7 lines
120 B
YAML
---
|
|
- name: Restart fail2ban
|
|
ansible.builtin.systemd:
|
|
name: fail2ban
|
|
daemon_reload: true
|
|
state: restarted
|