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

Molecule and Ansible Collections #2165

Open
decentral1se opened this issue Jul 10, 2019 · 4 comments

Comments

@decentral1se
Copy link
Member

commented Jul 10, 2019

See ansible/ansible#57106.

We should try to make it possible to generate and understand collections here in Molecule.

I am not sure how this can be done right now but I'm creating this to track.

If someone has time, please do pick this up. I'll be happy to assist.

@decentral1se

This comment has been minimized.

Copy link
Member Author

commented Jul 14, 2019

ansible/ansible#57106 (comment)?

Unclear what is being planned.

@jctanner

This comment has been minimized.

Copy link
Member

commented Jul 15, 2019

Here's the tentative plan:

  • ansible-galaxy collection is going to be shipped in ansible-2.9 for all ansible users and customers to use as the standalone way to init, build, publish and install collections without any additional dependencies
  • ansible-test will be enhanced to understand collections and run sanity/unit/integration tests that we already have in the ansible/ansible repo. It will also become part of the distribution package that ends up in pypi.
  • Once the first two items are completed, we can have molecule call out to them directly via the sh library much like molecule does with most other tools.
@geerlingguy

This comment has been minimized.

Copy link

commented Aug 20, 2019

Just posted: How to add integration tests to an Ansible collection with Molecule. It seems like only minimal changes were needed (and mostly for CI—for local testing everything pretty much 'just works').

Note that I did not use molecule init to generate the Collection (since that's not a thing yet)—but I don't generally use molecule init to generate new roles either, I build the role separately, then molecule init to add the molecule configuration to an existing role, since I have an inherent distrust for 'init' commands of downstream tooling (though it's a silly thing to not trust).

@decentral1se

This comment has been minimized.

Copy link
Member Author

commented Aug 24, 2019

Thanks for this @geerlingguy, solid stuff.

decentral1se added a commit to decentral1se/molecule that referenced this issue Sep 8, 2019
decentral1se added a commit that referenced this issue Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.