Best practices ansible-galaxy

The answer to a question I asked was, that I should alter a role I installed from galaxy to solve my problem. I already utilized/altered several other roles from galaxy, but I’m still not sure of what’s the proper workflow for galaxy.

  • Are there guidlines/articles around galaxy workflows?

  • Do I install them to my project folder or globally?

  • Is there a version/dependency management planned (like bundler for ruby)?

  • Alterations of roles (assuming the changes are too specific to create a pull request):

  • How to alter a role but still be able to get updates from “upstream”? Or is this the wrong way to think about it and galaxy installs are more of a one-shot thing?

  • My idea would then be to rather clone the the role via git, put my changes in a patch and pull regularly from upstream. But this would kind of defeat the purpose of galaxy install?

"

  • Are there guidlines/articles around galaxy workflows"
    YES. Help lives here:

https://galaxy.ansible.com/intro

"

  • Is there a version/dependency management planned (like bundler for ruby)"
    The ansible-galaxy tool can already install things with a requirements file, see --help. It knows about deps already too, even without that. All role deps are automatically downloaded. We’re open to enhancements and these should be discussed on ansible-devel

If you want to submit a pull request to somebody else’s role it’s up to them to merge it in.

If you have your own, it probably doesn’t make sense to upload it to Galaxy - that would clutter things up, unless they start to diverge or can’t be reconciled.

Internal non-reusable things for personal or private infrastructure probably don’t belong on Galaxy.