Created
May 20, 2014 13:57
-
-
Save halberom/44bb22e1de6b47e9aaee to your computer and use it in GitHub Desktop.
iterate over var of manifests
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
GATHERING FACTS *************************************************************** | |
ok: [localhost] | |
TASK: [test] ****************************************************************** | |
ok: [localhost] => (item={'value': {'smf_name': 'trollname', 'method': 'trollimethod', 'manifest': 'trollifest'}, 'key': 'troll'}) => { | |
"item": { | |
"key": "troll", | |
"value": { | |
"manifest": "trollifest", | |
"method": "trollimethod", | |
"smf_name": "trollname" | |
} | |
}, | |
"msg": "key troll, manifest trollifest" | |
} | |
ok: [localhost] => (item={'value': {'smf_name': 'trollname2', 'method': 'trollimethod2', 'manifest': 'trollifest2'}, 'key': 'troll2'}) => { | |
"item": { | |
"key": "troll2", | |
"value": { | |
"manifest": "trollifest2", | |
"method": "trollimethod2", | |
"smf_name": "trollname2" | |
} | |
}, | |
"msg": "key troll2, manifest trollifest2" | |
} |
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: all | |
vars: | |
custom_smf: | |
troll: | |
smf_name: trollname | |
manifest: trollifest | |
method: trollimethod | |
troll2: | |
smf_name: trollname2 | |
manifest: trollifest2 | |
method: trollimethod2 | |
tasks: | |
- debug: msg="key: {{ item.key }}, manifest: {{ item.value.manifest }}" | |
with_items: custom_smf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment