Append to a List with Jinja

To append to a list you need to use display brackets `` and then use a hack to not actually display anything

{% set policy_list = [] %}
{% for ip in host_ip  %}
    {{ policy_list.append(ip) or "" }}

So lame

Source