[ansible-project] Re: Accessing a sub-variable from a JSON output

2018-12-19 Thread JS
Hi Eric Brilliant! Thank you very much! - That put me down the right path. Once I understood your syntax, I managed to get all of these to work: - name: debug 0 debug: var: test123 - name: debug 1 debug: var: test123[0].namespace_path - name: debug 2 debug: msg: The value

[ansible-project] Re: Accessing a sub-variable from a JSON output

2018-12-18 Thread Eric Brewer
I think you need to declare ansible_facts before your variable, and then you need to iterate through the array so try this: - name: debug debug: msg: "{{ item['name'] }}" with_items: "{{ ansible_facts['test123'] }}" And if you don't want to iterate through all of them, you need to call