for statement in Jinja2 templates with Ansible

tasks/main.yml:

- name: configure
  template:
    src: haproxy.cfg.j2
    dest: /etc/haproxy/haproxy.cfg
    owner: root
    group: root
    mode: 0644
  notify: reload haproxy

templates/haproxy.cfg.j2:
...
backend refinery
{% for backend in haproxy_backends %}
    {{ backend }}
{% endfor %}
...

defaults/main.yml:
...
haproxy_stats: true
haproxy_backends:
  - 'server refinery01 192.168.5.41:8080 check'
  - 'server refinery02 192.168.5.42:8080 check'
...