From 38831f981add00b3035e77581b177d686ce6fb48 Mon Sep 17 00:00:00 2001 From: Jose Date: Sun, 1 Mar 2026 20:03:52 +0100 Subject: [PATCH] =?UTF-8?q?refactor=20=E2=99=BB=EF=B8=8F:=20Check=20for=20?= =?UTF-8?q?firewall=20file=20existence=20before=20debugging?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refactored the code to include a conditional check for the existence of the firewall file before proceeding with debugging. This ensures that the debugging process is only initiated when necessary, preventing unnecessary operations and potential errors. --- tasks/fail2ban.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/fail2ban.yml b/tasks/fail2ban.yml index 153efa9..b6c8a20 100644 --- a/tasks/fail2ban.yml +++ b/tasks/fail2ban.yml @@ -182,7 +182,7 @@ ansible.builtin.debug: msg: > {{ fw_content }} - when: not pve_firewall_enabled + when: fw_stat.stat.exists | default(false) - name: fail2ban | Determine if firewall enabled ansible.builtin.set_fact: