Skip to content

Instantly share code, notes, and snippets.

@hagbarddenstore
Created September 1, 2016 11:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hagbarddenstore/6477d171d6ffbcba924eb303a0e69d15 to your computer and use it in GitHub Desktop.
Save hagbarddenstore/6477d171d6ffbcba924eb303a0e69d15 to your computer and use it in GitHub Desktop.
$ ansible-playbook test.yml
PLAY [localhost] ***************************************************************
TASK [debug] *******************************************************************
ok: [localhost] => {
"hosts": {
"correct": "{\"host\":\"127.0.0.1\"}",
"incorrect": {
"host": "127.0.0.1"
}
}
}
PLAY RECAP *********************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=0
---
- hosts: localhost
gather_facts: false
vars:
localhost: 127.0.0.1
hosts:
correct: '{"host":"127.0.0.1"}'
incorrect: '{"host":"{{ localhost }}"}'
tasks:
- debug: var=hosts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment