Here is a list of manual steps that you need to take such that you can actively work on a playbook that requires a role that you’ve decided to extract and put on the galaxy.
Here is the work flow:
https://gist.github.com/AntelopeSalad/e55db863fd6b8bdf155c
I’ve only been using ansible for a few days but even after doing this workflow twice I already feel inclined to never make a public role again because of how difficult it is to maintain while using it in a playbook that you’re actively developing.
So I’m thinking it would be possible to make a python based or bash command line app to make this less painful because I’m not sure it belongs in the ansible-galaxy binary but maybe it does. I haven’t really thought about.
Are there better work flows that I’m missing out which don’t involve custom tooling?
Yeah, fortunately, you’re missing the ansible-galaxy CLI, which is used to download things.
Manual copying is not required.
I think a good question here, rather than saying “eh, this sucks” would be finding what sort of hypothethical ansible-galaxy subcommands (that don’t exist) that you would like to see.
Knowing what these commands might be would be helpful in understanding what could be optimized.
Finally, once we decide on what they could be, we could entertain patches around adding those subcommands to ansible-galaxy.
This is better than creating another tool, outside of core, by all means – and keeps things simpler.
I’ve been using the ansible-galaxy CLI. I used it to scaffold the role and also install other roles. The gisted work flow is all about microing how to actually use a galaxy published role locally while actively developing a playbook that may require changes to the galaxy role.
This is a good idea and is worth exploring for sure. I’ll try to think of what it would do, etc… but I also hope others chime in with their thought process too about the topic in general or their ideas on how it could work too.
I figured out a way to remove much of the complexity without tools but it required really drilling deep into the docs and stumbling upon a certain configuration option.
http://docs.ansible.com/intro_configuration.html#roles-path
Setting a few different roles paths fixes everything.