Commit 0f7fe7f
committed
mirror: fix firewalld status check to prevent spurious failures
The firewalld status check tasks in both linux-mirror and nix-cache-mirror
roles were using ignore_errors which still caused tasks to be marked as
FAILED when firewalld is inactive. On systems without firewalld or where
it is not running, systemctl is-active returns exit code 4, which Ansible
interprets as a failure even with ignore_errors set.
Changed both tasks to use failed_when: false instead of ignore_errors. This
tells Ansible the task cannot fail and prevents spurious FAILED markers in
the output. The changed_when: false directive was already present in
linux-mirror and has been added to nix-cache-mirror for consistency since
checking service status does not modify system state.
The downstream firewall rule tasks already have correct conditionals that
check firewalld_status.stdout for active status, so they will only run when
firewalld is actually active.
Generated-by: Claude AI
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Daniel Gomez <[email protected]>1 parent 6b7027e commit 0f7fe7f
2 files changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
362 | | - | |
| 362 | + | |
363 | 363 | | |
364 | | - | |
365 | 364 | | |
366 | 365 | | |
367 | 366 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
| 145 | + | |
145 | 146 | | |
146 | 147 | | |
147 | 148 | | |
| |||
0 commit comments