if defined for nested dict value

31 views
Skip to first unread message

rob

unread,
Jul 12, 2015, 4:19:19 PM7/12/15
to ansible...@googlegroups.com
Hi

I would like to check if nested dict value is defined, eg.:
when: ansible_local.resolver.resolver_override is not defined

But if ansible_local (fact.d) is not exists I get error message:
error while evaluating conditional: ansible_local.resolver.resolver_override is not defined

Is there any way to create condition if nested dict value is defined regardless of existence the whole dict hierarchy?
Reply all
Reply to author
Forward
0 new messages