Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reogarnising the playbooks and the molecules scenarios #95

Merged
merged 2 commits into from
Oct 13, 2023
Merged

Conversation

rpelisse
Copy link
Collaborator

@rpelisse rpelisse commented Oct 5, 2023

@rmarting I've reorganized our playbooks and molecule scenario to be more consistent with the Ansible best practices. Most of our playbooks inside the folder playbooks are actually advanced scenarios (advanced examples) and not really "ready to be used" playbooks. So instead using import playbook in the converge (which also not recommanded), I've move them into their own scenario. I've added to the playbooks folder ready to be use playbook to set up a brokers, zookeepers, connect or control cruise. So now, collection users can simply provides (for instance) the inventory of their brokers and directly run the playbook we provided:

$ ansible-playbook -i inventory middleware_automation.amq_streams.brokers

PS: Fun fact, doing the reorg, I stumble upon the same bug you had in your blogpost! That's one of the reason, it was good to move those playbook into the molecule scenario, better control of their content.

@rpelisse rpelisse self-assigned this Oct 5, 2023
@rpelisse rpelisse added enhancement New feature or request minor_changes New parameters added to modules, or non-breaking behavior changes to existing parameters; no bugfix labels Oct 5, 2023
@rpelisse rpelisse changed the title Reog play mol Reogarnising the playbooks and the molecules scenarios Oct 6, 2023
Copy link
Collaborator

@rmarting rmarting left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not an Ansible tester expert with Molecule, however this organization is better than the previous one. Adding more complex (or advance) scenarios in molecule will give us a safe scenario for any new change done in the collection, and showing sample cases in the playbooks folder is a good starting point.

However, I am thinking that we should add some of the molecule scenarios as chapters or sections in the documention. I don't think the readers will go throught the molecule folder to get more advance examples.

In any case, LGTM!

@rpelisse rpelisse merged commit 4dd4f17 into main Oct 13, 2023
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request minor_changes New parameters added to modules, or non-breaking behavior changes to existing parameters; no bugfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants