Hi, is there a list of Ansible repositories containing roles that were meant to be used together? A repository such as this one for Puppet https://github.com/example42/puppet-modules
These are the only two that I have found so far....
https://github.com/drybjed/ginas
https://github.com/jnv/ansible-fedora-infra
I am aware of Ansible Galaxy but as a new user I am curious about a collection of roles and Ansible configuration that I could use as a starting point to manage day-to-day tasks and software deployments on a number of EL6 systems. Are there any that you are aware of?
~ Elliot
Those are basically just collections of things people wrote for their own infrastructure, which is fine, of course. Ansible-galaxy already has this concept natively in terms of role dependencies if you want to make a role that requires others.
(With dependencies, a role can require other roles to run before it)
Roles are also namespaced based on their creator, so things like asdf.role1 and asdf.role2 are clearly belonging to and coming from the user ‘asdf’.
If you’re more interested in surfing people’s real world deployments, though, another example might be edX.org’s open source configuration repo, which has a lot of Ansible:
https://github.com/edx/configuration/tree/master/playbooks/roles
I guess I’d say that Ansible roles don’t neccessarily trend to the same problems that Puppet modules do, where some are very idiomatic and contain custom code and so on (due to the non-batteries-included core and tend for people to drop into custom code), Ansible roles tend to be very “Ansible-like”, and are easier (in my experience) to interchange when they come from different people, so it’s much less of an issue.
Thank you. A collection is what I was hoping to find so that I could get a better idea of how a large collection of roles could interoperate. I will go through this repository's contents to get more ideas.
~ Elliot
Yeah I think as you see when anything is applied in practice real-world expedience can make things less ideal. But it’s interesting to see how things are managed as a hole.
This is also pretty cool from an OSS perspective:
https://github.com/al3x/sovereign
Hello,
Michael, can you please briefly comment on the “Ansible best practices” aspect of the projects you mentioned:
https://github.com/al3x/sovereign
https://github.com/edx/configuration/tree/master/playbooks/roles
I have been using ansible for a while and have been writing everything from scratch. After a while my ansible code is getting a bit messy, and I would like to learn from real-world best practices. Are the above a good starting point?
Tony