roles/common: rework fail2ban tasks
We can only run fail2ban when we have logs to monitor. When a host is running Caddy we don't have logs, so fail2ban doesn't have any- thing to monitor out of the box. For now I will restrict the task to hosts running nginx.
This commit is contained in:
@ -25,3 +25,4 @@
|
||||
ansible.builtin.systemd:
|
||||
name: fail2ban
|
||||
state: restarted
|
||||
when: webserver is defined and webserver == 'nginx'
|
||||
|
Reference in New Issue
Block a user