Created
April 7, 2015 16:33
-
-
Save natefoo/35548eca0ad5c9b2663f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PLAY [localhost] ************************************************************** | |
GATHERING FACTS *************************************************************** | |
ok: [localhost] | |
TASK: [debug var=hash] ******************************************************** | |
ok: [localhost] => { | |
"var": { | |
"hash": { | |
"bar": "bar", | |
"foo": "foo" | |
} | |
} | |
} | |
TASK: [debug var=hash.foo] **************************************************** | |
ok: [localhost] => { | |
"var": { | |
"hash.foo": "foo" | |
} | |
} | |
TASK: [set_fact hash="{{ hash2 }}"] ******************************************* | |
ok: [localhost] | |
TASK: [debug var=hash] ******************************************************** | |
ok: [localhost] => { | |
"var": { | |
"hash": { | |
"foo": "baz", | |
"quux": "quux" | |
} | |
} | |
} | |
TASK: [debug var=hash.foo] **************************************************** | |
ok: [localhost] => { | |
"var": { | |
"hash.foo": "{{hash.foo}}" | |
} | |
} | |
PLAY RECAP ******************************************************************** | |
localhost : ok=6 changed=0 unreachable=0 failed=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: localhost | |
connection: local | |
vars_files: | |
- vars.yml | |
vars: | |
hash: "{{ hash1 }}" | |
tasks: | |
- debug: var=hash | |
- debug: var=hash.foo | |
- set_fact: hash="{{ hash2 }}" | |
- debug: var=hash | |
- debug: var=hash.foo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
hash1: | |
foo: foo | |
bar: bar | |
hash2: | |
foo: baz | |
quux: quux |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment