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

hvisage

Renowned Member
May 21, 2013
249
19
83
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
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!