Using molecule with multi-role repositories

Hi,

I have a repository with multiple roles, and need some guidance on how to run molecule. Are there any guides/examples on configuring molecule to run on roles based on a glob or wildcard path?

I know there was a discussion on this a few years ago, but I have not seen any recent development or examples.

I appreciate the help!

You might want to check @evgeni 's blog on this, he just posted it last week :wink:

2 Likes

Oh nice, I’ll check this out! Thank you!

I don’t have a perfect answer for you, but my team does this in our repo and we’ll have a molecule dir in each role w/ its own molecule.yml config and scenarios and we’ll kick it off with tox.

since molecule.yml supports shell variable substitution/parameter expansion it works hand-in-hand with tox pretty well to take env vars for instance names and the like so that you don’t have to completely make every moleucle.yml from scratch and either control things through env vars that get picked up by tox or have a different tox env for each role if that makes sense.

1 Like