Hi,

several times now I came across situation where one of the modules returns 
'empty list' in variable and it would be handy to have a simple test like:

{% if foo is empty %}

which is not the same as

{% if foo is defined %} 

because former case covers also "", [], {} and None as well as "undefined". 
Sort of like "empty()" call in PHP.

Right now I've been managing situation with crutches like:

when: foo_list|join('') != ''

but that is non-descriptive and hackish IMO. Is there an interest of adding 
this feature? Shall I post into Github issue tracker?

-- 
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/9d9f8ef2-87df-4a50-80c9-eec1cb1e84e1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to