fix: derive cluster network interface from host facts
Deploy Cluster / Terraform (push) Successful in 28s
Deploy Cluster / Ansible (push) Failing after 12m32s

The Proxmox Ubuntu clones are exposing their primary NIC as eth0, not ens18.
Use ansible_default_ipv4.interface for k3s flannel and kube-vip so bootstrap
tracks the actual interface name instead of a guessed template default.
This commit is contained in:
2026-04-22 03:50:03 +00:00
parent 06366ee5e6
commit b3e88712bd
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -4,4 +4,4 @@ k3s_server_url: ""
k3s_token: "" k3s_token: ""
k3s_node_ip: "" k3s_node_ip: ""
k3s_kubelet_cloud_provider_external: false k3s_kubelet_cloud_provider_external: false
k3s_flannel_iface: ens18 k3s_flannel_iface: "{{ ansible_default_ipv4.interface | default('eth0') }}"
+1 -1
View File
@@ -6,7 +6,7 @@ k3s_primary_public_ip: ""
k3s_disable_embedded_ccm: false k3s_disable_embedded_ccm: false
k3s_disable_servicelb: true k3s_disable_servicelb: true
k3s_kubelet_cloud_provider_external: false k3s_kubelet_cloud_provider_external: false
k3s_flannel_iface: ens18 k3s_flannel_iface: "{{ ansible_default_ipv4.interface | default('eth0') }}"
# Load Balancer endpoint for HA cluster joins (set in inventory) # Load Balancer endpoint for HA cluster joins (set in inventory)
kube_api_endpoint: "" kube_api_endpoint: ""
# Tailscale DNS names for control planes (to enable tailnet access) # Tailscale DNS names for control planes (to enable tailnet access)
@@ -1,4 +1,4 @@
--- ---
kube_vip_version: v1.1.2 kube_vip_version: v1.1.2
kube_vip_interface: ens18 kube_vip_interface: "{{ ansible_default_ipv4.interface | default('eth0') }}"
kube_vip_address: "{{ kube_api_endpoint }}" kube_vip_address: "{{ kube_api_endpoint }}"