fix(fail2ban-basic): skip enable and restart when check mode previews a first install #12
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/fail2ban-check-mode-first-install"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Under --check on a host that never had fail2ban, the package install
is only simulated, so there is no fail2ban unit yet: enabling it or
restarting it fails the preview run.
Register the install result and record fail2ban_basic_preview_only
when check mode reports the install as a change. The enable task and
the restart handler skip themselves in that case, so a dry run on a
fresh host completes and a live run is unaffected.