Skip to content

Guard shutdown task against accidental production runs - #1

Open
bradydibble wants to merge 1 commit into
mainfrom
fix/guard-shutdown-task
Open

Guard shutdown task against accidental production runs#1
bradydibble wants to merge 1 commit into
mainfrom
fix/guard-shutdown-task

Conversation

@bradydibble

Copy link
Copy Markdown
Owner

Summary

  • The shutdown task in gather_facts_ephemeral.yml previously fired on all non-Windows hosts
  • If the playbook was run with a misconfigured limit or against all, it would shut down production machines
  • Adds a group_names | intersect guard so shutdown only fires on linux_test_vms or game_servers hosts

What happened

The playbook was accidentally assigned to Ascender templates targeting production hosts (cairn-02, cairn-03). Both machines shut down while the admin was 300 miles away.

Test plan

  • ansible-playbook --check --diff against an inventory with production hosts — shutdown should show skipping
  • Verify child groups (rlc_test_vms, oracle_test_vms, etc.) still inherit linux_test_vms membership

🤖 Generated with Claude Code

The shutdown task in gather_facts_ephemeral.yml previously fired on all
non-Windows hosts. If the playbook was ever run with a misconfigured
limit or against 'all', it would shut down production machines.

Add a group_names intersect guard so shutdown only fires on hosts in
linux_test_vms or game_servers groups — the only groups where ephemeral
shutdown is expected.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant