Created
January 14, 2019 16:15
-
-
Save larsks/f6a5f546868d1f6de9283a4abd21cc56 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
{ | |
"fa": { | |
"ansible_purefa_facts": { | |
"volumes": { | |
"PoC-VM_Volumes": { | |
"bandwidth": null, | |
"hosts": [ | |
[ | |
"VM-003-IOM", | |
1 | |
] | |
], | |
"serial": "1079E7C9294245FA000117CF", | |
"size": 1099511627776, | |
"source": null | |
}, | |
"test1": { | |
"bandwidth": null, | |
"hosts": [ | |
[ | |
"VM-003-IOM", | |
11 | |
] | |
], | |
"serial": "1079E7C9294245FA000117E0", | |
"size": 1073741824, | |
"source": null | |
} | |
} | |
}, | |
"changed": false, | |
"invocation": { | |
"module_args": { | |
"gather_subset": [ | |
"volumes" | |
] | |
} | |
} | |
} | |
} |
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 | |
gather_facts: false | |
vars_files: | |
- facts.json | |
tasks: | |
- debug: | |
msg: "{{ item.value.serial }}" | |
when: item.key == "test1" | |
with_dict: "{{ fa.ansible_purefa_facts.volumes }}" | |
loop_control: | |
label: "{{ item.key }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment