Proxmox network interface configuration: template error while templating string: Encountered unknown tag 'item'

Hi everyone

I’m trying to setup multiple proxmox network interfaces for my containers with Ansible.

Here is the code that I’m using. You can see in the netif property that I sometimes want to add a second interface to the container.

`

  • name: Create instances
    proxmox:
    vmid={{ item.id }}
    node=‘simpsons’
    api_user=‘{{ proxmox.api.username }}’
    api_password=‘{{ proxmox.api.password }}’
    api_host=‘localhost’
    password=‘{{ item.hostname | b64encode | to_uuid }}’
    hostname=‘{{ item.hostname }}’
    onboot=yes
    memory={{ item.memory }}
    ostemplate=‘local:vztmpl/debian-8.0-standard_8.4-1_amd64.tar.gz’
    netif=’
    {“net0”:“name=eth0,gw=10.100.0.1,ip=10.100.0.{{ item.id }}/24,bridge=vmbr0”}
    {% item.public_ip is defined %}