interfaces.d/ifcfg-vmbr0 not "seen" by ProxMox 3.4 (ansible ?)

hvisage

Renowned Member
May 21, 2013
297
32
93
Hi there,

Using ProxMox 3.4 and making use of an Ansible playbook/role to create the Debian interface information in /etc/network/interfaces.d/ifcfg-<interfacename>, but proxmox does not pick it up, unless I move ifcfg-vmbr0's contents to /etc/network/interfaces.

Anybody have a preferred Ansible role/playbook to configure ProxMox network interfaces?
 
Hi
Proxmox VE only works with /etc/network/interfaces

To create an interface I would suggest you to do via the pvesh, which the command line client to the Proxmox API.
For instance I use in my ansible playbook:

Code:
   - name: create a bridge vmbr0 bridge if if does not already exist
      # > indicates a multiline string in YAML synthax
      shell: >
        ifquery --state vmbr0 || pvesh create nodes/px1/network
        -iface vmbr0 -type bridge -bridge_ports eth1
        -address {{ ansible_ssh_host }} -netmask 255.0.0.0
        -autostart true