From 4abac66c1ca799029b13076e0c14a8e9a676e401 Mon Sep 17 00:00:00 2001 From: Ahmed Abdelhalim Date: Wed, 6 May 2026 01:36:44 +0200 Subject: Fix proxmox proxy not starting because of ipv6.local resolution issue The ipv6.local resolution uses the ZONE_ID to distinguish between the ipv6 on local env (wlan0) and this causes the cert generation to fail Using /etc/hosts file for the resolution is better than disabling ipv6 or writing a wrapper for the service. Assisted-By: Claude Code --- roles/proxmox-ve/handlers/main.yml | 6 ++++++ roles/proxmox-ve/tasks/main.yml | 23 ++++++++++++++++------- 2 files changed, 22 insertions(+), 7 deletions(-) create mode 100644 roles/proxmox-ve/handlers/main.yml (limited to 'roles') diff --git a/roles/proxmox-ve/handlers/main.yml b/roles/proxmox-ve/handlers/main.yml new file mode 100644 index 00000000..ccce330d --- /dev/null +++ b/roles/proxmox-ve/handlers/main.yml @@ -0,0 +1,6 @@ +--- +- name: "Restart pveproxy" + become: true + ansible.builtin.systemd_service: + name: "pveproxy" + state: "restarted" diff --git a/roles/proxmox-ve/tasks/main.yml b/roles/proxmox-ve/tasks/main.yml index 952a1e91..77975f0c 100644 --- a/roles/proxmox-ve/tasks/main.yml +++ b/roles/proxmox-ve/tasks/main.yml @@ -5,6 +5,9 @@ name: "proxmox-ve" state: "present" update_cache: true + tags: + # Since proxmox-ve package setups network and configure grub/kernel hooks which doesn't work in containers + - "molecule-notest" - name: "Configure Proxmox repos" become: true @@ -22,14 +25,17 @@ path: "/etc/apt/sources.list.d/pve-enterprise.list" state: "absent" -- name: "Disable IPv6 on wlan0 (prevents PVE cert generation failures with zone IDs)" +- name: "Set management IP in /etc/hosts for PVE cert generation" become: true - ansible.posix.sysctl: - name: "net.ipv6.conf.wlan0.disable_ipv6" - value: "1" - state: "present" - sysctl_set: true - reload: true + ansible.builtin.lineinfile: + path: "/etc/hosts" + regexp: "^{{ network_ipv4_address }}" + line: "{{ network_ipv4_address }} {{ ansible_facts['hostname'] }}" + state: present + notify: "Restart pveproxy" + tags: + # Since container doesn't have network ip address, skipping this test + - "molecule-notest" - name: "Enable and start Proxmox VE services" become: true @@ -42,3 +48,6 @@ - "pvedaemon" - "pveproxy" - "pvestatd" + tags: + # Since proxmox-ve package was ignored from testing, we need to ignore this too + - "molecule-notest" -- cgit v1.2.3