A play needs to destroy a test environment on schedule to save money.
BeginnerScenarioAWX, Cloud and Large-Scale Operations
Answer
Situation read → Scheduled teardown.
What I'd do →
- amazon.aws.ec2_instance:
filters: { "tag:Env": test, instance-state-name: running }
state: absent
Schedule the job in AWX nightly, and use a protection tag to exempt instances.
Why → Filters make it declarative and repeatable.
Interview tip → Dry-run with --check and require approval for anything tagged prod.
More on AWX, Cloud and Large-Scale Operations
Your company wants a self-service UI for running playbooks with RBAC. What do you propose?BeginnerHow do you run AWX on Kubernetes?BeginnerA job template should prompt for the target limit and a version, with validation.IntermediateYou need provisioning followed by configuration followed by an approval and then deploy.IntermediateA dynamic inventory source in AWX syncs slowly and stale hosts remain.IntermediateYou manage 5,000 servers and a single job takes hours.Advanced