ansible-community / ansible-community/molecule-plugins
CFD - move 'create.yml' and 'destroy.yml' into collection?
- Dominant language
- Python
- Stars
- 164
- Forks
- 113
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 1
Description
Simple "call for discussion" - the current approach creates the molecule directory **and** the implementation of 'create.yml' and 'destroy.yml' playbooks. That would be fine if we never fixed bugs, added functionality, etc. But that's not the real world - and it's a pain to update existing code.
One possible solution is to move the 'create.yml' and 'destroy.yml' playbooks. The templating would still create the 'create.yml' and 'destroy.yml' files but they would be shells that immediately call the corresponding playbooks in the collection. The templating would also add 'collections.yml'.
(If molecule can't handle collections we could use a traditional role, although the code won't be as clean.)
The templated 'create.yml' and 'destroy.yml' files could still perform some initial sanity checks, e.g., verifying that values are non-null. That would mostly be documentation since the playbooks in the collection should still perform the same checks.
Implementation notes:
I think the 'collection' infrastructure can use the same repo. We would need to add a few new files and directories but not change anything other that what I mentioned above.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing the templating that creates the molecule directory and the create.yml and destroy.yml playbooks, then inspect the collection infrastructure. Determine whether the same repository can hold the collection files and directories, and verify that generated shells, collections.yml, and the existing sanity checks preserve current behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devops, tooling
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100