when executes inside the loop so it cannot prevent undefined errors,
the following does a union of the lists but makes sure to default each
to an empty list in case they are undefined:

with_items:"{{nginx_domain|default([])|union(nginx_port|default([]))}}"




-- 
Brian Coca

-- 
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/CAJ5XC8mYc5LQWYK%3DQFUFMKRfwR2xNTmbSb5_foNPZ%2BEK-oZjXQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to