I kind of remember reading about this in the documentation, but I have
spend an hour trying to find it with no success.
I am iterating over huge structures and the task is showing the complete
structure on the screen. I would like to show only a particular field.
Example:
"""
- name: Test directories
stat: path=/var/spool/nullmailer/{{ item }}
register: directories
with_items:
- queue
- tmp
- name: Delete directories, if they are actual directories
file: path=/var/spool/nullmailer/{{ item.item }} state=absent
when: item.stat.isdir is defined and item.stat.isdir
with_items: "{{ directories.results }}"
"""
The second task will print the complete "item" entry, including the
complete "stat" structure per directory. I would like to print only, for
example. "item.item" or "item.path".
Thanks.