Ansible keepalived increment int

Hi all

I have a template I've been working on for keepalived and as part of the template, I want to get it to loop through a list of virtual ips and sub interface eth0 based on the number of virtual ips to manage . What i have so far is below . Any one any ideas ?

virtual_ipaddress {

virtual IP

{% for item in keepalived_virtual_ip %}

        {{ item.address }} dev eth0 label eth0:{{ file_number | int + 1 }}

    }

    track_script {

    haproxy

    pingable_check_script

    }

Check out the loop.depth or loop.depth0 varaible that is available in a for loop
http://jinja.pocoo.org/docs/2.10/templates/#for