I have a list with several vars which I would like to loop over a template.
myList:
- { var1: true, var2: this is another var, ... }
Within this template I want to check some conditions like
{% if item.var1|bool %}
--> fill something
{% endif %}
my task is using the building template function and uses with_items to iterate over the list.
The strange thing is, that jinja2 complains about unknown tag 'item' in the template.
When I remove the item and only do this:
{% if var1|bool %}
--> fill something
{% endif %}
then jinjy2 complains about unknown tag var1.
Is there a special way to use elements of item lists in conditionals?