On 09. mars 2017 16:45, Christian Iuga wrote:
i don't known how to try write my with_items condition :
with_items: "{{ file|default([]) }}" : is skipping but not work on normal
condition (without the --tags )
with_items: "{{ file|default([]).results }}" : template error while
templating string
with_items: "{{ file.results|default([]) }} : 'file' is undefined
Do you have a idea how to deal with this kind of problem ?
You need to filter file and file.results through the default filter.
with_items: "{{ (file | default([])).results | default([]) }}"
--
Kai Stian Olstad
--
You received this message because you are subscribed to the Google Groups "Ansible
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/55e8baf5-f3a2-5505-19f3-14eee56b2183%40olstad.com.
For more options, visit https://groups.google.com/d/optout.