ansible-community / ansible-community/molecule-plugins
EC2: Cleanup of Security Group and Keypair tasks are skipped
- Dominant language
- Python
- Stars
- 164
- Forks
- 113
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 1
Description
# Problem
The `destroy.yml` of the EC2 driver uses a wrong execution order. The tasks `Write Molecule instance configs` will immediately change the condition of the block. As soon as variable is cleaned all remaining tasks of the block will be skipped regardless of their when conditions. The cleanup tasks of for ephemeral security groups and keys will be skipped and the resources will stay.
# Solution
Moving the tasks `Write Molecule instance configs` to the end of the destroy block. With that all destroy tasks will be executed and resources will be wiped.
Contributor guide
No contributing guide indexed for this repository
Research direction
Open the EC2 driver's destroy.yml and inspect the destroy block around the “Write Molecule instance configs” task and its cleanup conditions. Verify the execution order and run the relevant Molecule EC2 destroy checks if available; done means ephemeral security groups and keypairs are removed instead of being left behind.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100