Hello,
Is it possible to skip a task with_subelements if its dictionary is
undefined?
For example,
- authorized_key: "user={{ item.0.name }} key='{{ lookup('file', item.1)}}'"
with_subelements:
- users
- authorized
when: users is defined
This is failed with;
fatal: [localhost] => subelements lookup expects a dictionary, got 'users'.
It seems with_subelements evaluate the action before check condition.
Thanks
--
nakai
--
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/eaf43b5b-dc5a-4387-8bcd-6bf9b8d2be10%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.