fix(ansible): guard archived destructive plays with confirm_destroy #219

Merged
k.renner merged 1 commits from fix/issue-207 into master 2026-07-14 10:51:18 +00:00
Member

Fixes #207

Problem

ansible/plays/archived/ contains still-runnable destructive plays with no confirmation guard:

  • remove_ceph_cpool.yml:43-44 - zfs destroy -rf looped over matching volumes on hosts: pve_cluster (whole Proxmox cluster).
  • cleanup-gitea-mess.yml:19-39 - deletes the gitea service/binary/config/user on hosts: all:!gitea.srv.renner.uno.

Both execute immediately if invoked despite living in an "archived" directory.

Fix

Added the same fail-task safety-switch pattern already used in ansible/plays/update-dist-upgrade.yml (confirm_upgrade) to both plays: a confirm_destroy var defaulting to false, with a Safety Check task that fails immediately unless the play is run with -e 'confirm_destroy=true'.

Verification

ansible-playbook --syntax-check passes on both modified files.

Fixes #207 ## Problem ansible/plays/archived/ contains still-runnable destructive plays with no confirmation guard: - remove_ceph_cpool.yml:43-44 - zfs destroy -rf looped over matching volumes on hosts: pve_cluster (whole Proxmox cluster). - cleanup-gitea-mess.yml:19-39 - deletes the gitea service/binary/config/user on hosts: all:!gitea.srv.renner.uno. Both execute immediately if invoked despite living in an "archived" directory. ## Fix Added the same fail-task safety-switch pattern already used in ansible/plays/update-dist-upgrade.yml (confirm_upgrade) to both plays: a confirm_destroy var defaulting to false, with a Safety Check task that fails immediately unless the play is run with -e 'confirm_destroy=true'. ## Verification ansible-playbook --syntax-check passes on both modified files.
claude-bot added 1 commit 2026-07-14 10:06:31 +00:00
remove_ceph_cpool.yml (fleet-wide zfs destroy on pve_cluster) and
cleanup-gitea-mess.yml (deletes gitea service/binary/config/user on
all:!gitea.srv.renner.uno) are archived but still directly runnable
with no confirmation guard. Add the same fail-task safety-switch
pattern already used in plays/update-dist-upgrade.yml, requiring
-e 'confirm_destroy=true' before either play executes.

Fixes #207
k.renner merged commit ecf4c7f492 into master 2026-07-14 10:51:12 +00:00
Sign in to join this conversation.