Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.
Copy link

SayBeano commented May 23, 2016


edit: And thanks, @marktheunissen!

Copy link

henryxn commented May 26, 2016

In term of using variable in hosts attribute (line 58)

hosts: $groups -- apply to all hosts specified in the variable $groups

hosts : group # No $

$ ansible-playbook playbook1.yml -e "group=myservers"
$ ansible-playbook playbook1.yml --extra-vars="target=myservers"

Copy link

akofink commented Jul 26, 2016

sudo: true is deprecated in favor of become: true


Copy link

which editor u use for yaml?

Copy link

@antoniopinarella you can use any text editor. I use vim for .yml and it works fine.
(Probably you found it out. However for new people searches. )

Copy link

flamein commented Mar 9, 2018

Can we please bury this Gist? it keeps showing up as clickbait in search engines while the syntax is horribly outdated.

Copy link

dataf3l commented Sep 25, 2019

I love this, please include "become"

Copy link

I have made a fork and updated some of the content that has been deprecated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment