summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2026-07-06 17:17:50 +0200
committerAhmed Abdelhalim <[email protected]>2026-07-06 17:17:50 +0200
commit9407eecc04c703c1bfc413efda93c41ae305689f (patch)
tree094af4ee11406d73d51989b242f3d7413950f8a3 /roles
parent09fbb2b1d86b8ad6671c746f3df997390f7a6293 (diff)
Fix network setup on pve
Diffstat (limited to 'roles')
-rw-r--r--roles/network/meta/argument_specs.yml4
-rw-r--r--roles/network/tasks/main.yml4
-rw-r--r--roles/network/templates/bridge.nmconnection.j24
-rw-r--r--roles/network/templates/eth0-connection.nmconnection.j212
-rw-r--r--roles/pve-lxc/meta/main.yml1
5 files changed, 13 insertions, 12 deletions
diff --git a/roles/network/meta/argument_specs.yml b/roles/network/meta/argument_specs.yml
index f85318a8..0c9f74fe 100644
--- a/roles/network/meta/argument_specs.yml
+++ b/roles/network/meta/argument_specs.yml
@@ -30,7 +30,7 @@ argument_specs:
network_ipv6_dns:
type: "str"
description: "The network IP(4) gateway to configure when provided"
- network_bridge:
+ network_bridge_interface:
type: "str"
- description: "Bridge interface name — when set, ethernet becomes bridge port and bridge connection is created"
+ description: "Physical NIC to enslave as vmbr0 bridge port"
required: false
diff --git a/roles/network/tasks/main.yml b/roles/network/tasks/main.yml
index 1268b3cd..967a0b30 100644
--- a/roles/network/tasks/main.yml
+++ b/roles/network/tasks/main.yml
@@ -106,11 +106,11 @@
- name: "Configure bridge connection"
ansible.builtin.template:
src: "bridge.nmconnection.j2"
- dest: "/etc/NetworkManager/system-connections/{{ network_bridge }}.nmconnection"
+ dest: "/etc/NetworkManager/system-connections/vmbr0.nmconnection"
mode: "0600"
owner: "root"
group: "root"
- when: network_bridge is defined
+ when: network_bridge_interface is defined
- name: "Configure wifi connection"
ansible.builtin.template:
diff --git a/roles/network/templates/bridge.nmconnection.j2 b/roles/network/templates/bridge.nmconnection.j2
index 2e8bf23c..013acd6a 100644
--- a/roles/network/templates/bridge.nmconnection.j2
+++ b/roles/network/templates/bridge.nmconnection.j2
@@ -1,7 +1,7 @@
[connection]
-id={{ network_bridge }}
+id=vmbr0
type=bridge
-interface-name={{ network_bridge }}
+interface-name=vmbr0
autoconnect=true
[bridge]
diff --git a/roles/network/templates/eth0-connection.nmconnection.j2 b/roles/network/templates/eth0-connection.nmconnection.j2
index 6a6481c4..d6deea34 100644
--- a/roles/network/templates/eth0-connection.nmconnection.j2
+++ b/roles/network/templates/eth0-connection.nmconnection.j2
@@ -2,16 +2,18 @@
id=ethernet
type=ethernet
autoconnect=true
-{% if network_bridge is defined %}
-controller={{ network_bridge }}
-port-type=bridge
+{% if network_bridge_interface is defined %}
+interface-name={{ network_bridge_interface }}
+# NOTE: master/slave-type keyfile keys deprecated in NM 1.46, replaced by controller/port-type
+master=vmbr0
+slave-type=bridge
{% endif %}
[ethernet]
cloned-mac-address=permanent
[ipv4]
-{% if network_bridge is defined %}
+{% if network_bridge_interface is defined %}
method=disabled
{% elif network_ipv4_address is defined %}
method=manual
@@ -26,7 +28,7 @@ method=auto
[ipv6]
addr-gen-mode=default
-{% if network_bridge is defined %}
+{% if network_bridge_interface is defined %}
method=disabled
{% elif network_ipv6_address is defined %}
method=manual
diff --git a/roles/pve-lxc/meta/main.yml b/roles/pve-lxc/meta/main.yml
index 82db1bad..f12e3e48 100644
--- a/roles/pve-lxc/meta/main.yml
+++ b/roles/pve-lxc/meta/main.yml
@@ -2,7 +2,6 @@
dependencies:
- role: "proxmoxer"
- role: "pve"
- - role: "pve-network"
galaxy_info:
author: "a14m"
description: "Provision an LXC container on Proxmox VE"