From 665c2c84be67f4518e6a7ad3350995eff6983b2e Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 26 Feb 2026 17:24:12 +0100 Subject: [PATCH] Run the fail2ban handler only when fail2ban is installed and enabled. For real this time. --- handlers/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/handlers/main.yml b/handlers/main.yml index 9971a31..f0fe424 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -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: