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?