refactor ♻️: Check for firewall file existence before debugging #51

Merged
Jose merged 1 commits from dev into main 2026-03-01 20:05:15 +01:00
Showing only changes of commit 38831f981a - Show all commits

View File

@@ -182,7 +182,7 @@
ansible.builtin.debug:
msg: >
{{ fw_content }}
when: not pve_firewall_enabled
when: fw_stat.stat.exists | default(false)
Review

[Score: 3] It's better to handle cases where the firewall file might not exist explicitly instead of relying on defaults.

[Score: 3] It's better to handle cases where the firewall file might not exist explicitly instead of relying on defaults.
- name: fail2ban | Determine if firewall enabled
ansible.builtin.set_fact: