Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save marktheunissen/2979474 to your computer and use it in GitHub Desktop.

Select an option

Save marktheunissen/2979474 to your computer and use it in GitHub Desktop.
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.
@shiplu

shiplu commented Apr 12, 2016

Copy link
Copy Markdown

Great Playbook. A lot of things are clear to me now.

@gretel

gretel commented May 4, 2016

Copy link
Copy Markdown

should be part of the core documentation. thanks!

@SayBeano

SayBeano commented May 23, 2016

Copy link
Copy Markdown

Amazing!

edit: And thanks, @marktheunissen!

@henryxn

henryxn commented May 26, 2016

Copy link
Copy Markdown

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

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

REVISE:
hosts : group # No $

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

@akofink

akofink commented Jul 26, 2016

Copy link
Copy Markdown

sudo: true is deprecated in favor of become: true

source: http://docs.ansible.com/ansible/become.html

@antoniopinarella

Copy link
Copy Markdown

which editor u use for yaml?

@claudiols1979

Copy link
Copy Markdown

@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. )

@flamein

flamein commented Mar 9, 2018

Copy link
Copy Markdown

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

@dataf3l

dataf3l commented Sep 25, 2019

Copy link
Copy Markdown

I love this, please include "become"

@ogratwicklcs

Copy link
Copy Markdown

I have made a fork and updated some of the content that has been deprecated.
https://gist.github.com/ogratwicklcs/b9765a5b053b46586b4eb7fe61a15c82

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