summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2026-05-06 01:36:44 +0200
committerAhmed Abdelhalim <[email protected]>2026-05-06 11:15:29 +0200
commit4abac66c1ca799029b13076e0c14a8e9a676e401 (patch)
tree9845a0b7fba3c11de7e9a55be8769601dbe6e3d4
parent8f905acd42461bcccc30330c0c13619e3d5d48b5 (diff)
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
-rw-r--r--host_vars/pve.local.ymlbin559 -> 728 bytes
-rw-r--r--roles/proxmox-ve/handlers/main.yml6
-rw-r--r--roles/proxmox-ve/tasks/main.yml23
3 files changed, 22 insertions, 7 deletions
diff --git a/host_vars/pve.local.yml b/host_vars/pve.local.yml
index d9a5c586..411f7c6e 100644
--- a/host_vars/pve.local.yml
+++ b/host_vars/pve.local.yml
Binary files differ
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"