On Fri, 8 Nov 2019 03:54:47 -0800 (PST) "'Tobias Kirchhofer' via Ansible Project" <[email protected]> wrote:
> loop: "{{ FIREWALLD_ZONE_SERVICE|subelements('SERVICES') }}"
> when: FIREWALLD_ZONE_SERVICE is defined
>
> fatal: [...]: FAILED! => {"msg": "obj must be a list of dicts or a nested
> dict"}
Use *default* and *skip_missing* subelements. For example
loop: "{{ FIREWALLD_ZONE_SERVICE|default([])|
subelements('SERVICES', skip_missing=True) }}"
Cheers,
-vlado
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/20191108133146.1572e185%40gmail.com.
pgpg3LmfM9iYY.pgp
Description: OpenPGP digital signature
