ansible using versioned playbooks ala r10k

119 views
Skip to first unread message

Vince Skahan

unread,
Dec 8, 2016, 1:10:19 PM12/8/16
to Ansible Project
Working in a puppet shop, I have to admit r10k is pretty cool. It lets us set up 'versioned' environment definitions that we can apply to the right target computers, ala "use the development version of the puppet code (profile) that  configures package XYZ".    All those profiles are in git, with versioning done via either branches (give me branch-XYZ latest) or via tags (give me tag v1.2.3). 

One discussion on serverfault was at http://serverfault.com/questions/788930/what-is-the-equivalent-of-r10k-in-ansible - the preferred answer has a very good example of what a r10k Puppetfile looks like, and what the ansible-galaxy equivalent would be.  The question of course is how to do that in vanilla ansible 'without' galaxy.

Bottom line - we don't always use 'latest greatest version' of our automation code (puppet roles/profiles or for ansible roles/tasks/handlers/etc.), nor should we.  We're using the right version of our automation code and vars to get us the desired end state.

So, we want to be able to define our environments to say configuration-ABC is:
  • these variable=values definitions (from a tag or branch of a git repo)
  • these roles/tasks/handlers (from a tag or branch of a git repo, likely one per thingy we're trying to install+configure)
All without ansible-galaxy, using just ansible.  How might we make that happen ?

Again, the link above has a great definition of how Puppet/r10k work, and what the galaxy equivalent would be.  I just can't afford/use galaxy at all.  Thanks.

James Martin

unread,
Dec 8, 2016, 9:16:23 PM12/8/16
to ansible...@googlegroups.com
Answer is to use requirements.yml:  http://docs.ansible.com/ansible/galaxy.html#id10

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/990b647e-0614-4e1d-9d0f-98b6973839ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages