Run the fail2ban handler only when fail2ban is installed and enabled. For real this time.

This commit is contained in:
Andrea Dell'Amico 2026-02-26 17:24:12 +01:00
parent 07e2f241f3
commit 665c2c84be
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
1 changed files with 2 additions and 0 deletions

View File

@ -13,11 +13,13 @@
ansible.builtin.service:
name: fail2ban
state: restarted
when: fail2ban_enabled
- name: Reload fail2ban
ansible.builtin.service:
name: fail2ban
state: reloaded
when: fail2ban_enabled
- name: Enable and start fail2ban
ansible.builtin.service: