On 11.01.2017 01:16, [email protected] wrote:
What is the best way to test this condition?
when: "{{object is defined and object.property is defined and
object.property.property is defined and object.property.property ==
'mystring'}}"
A custom lookup?
What's best is always relative, but you could use this
when: ((object | default()).property | default()).property | default()
== 'mystring'
And remember, don't use curly brackets in when.
--
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/d755d9525a44e9d5f634e98e2c1307d9%40olstad.com.
For more options, visit https://groups.google.com/d/optout.