summaryrefslogtreecommitdiffstats
path: root/roles/proxmox-ve
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2026-05-06 00:04:09 +0200
committerAhmed Abdelhalim <[email protected]>2026-05-06 00:04:09 +0200
commit397dfa117941731fa43022b299c933e5375f7a60 (patch)
tree70f995fc64cc43ae531304a5f6bc6968e26449d9 /roles/proxmox-ve
parent2eace6a92436078e189d5961d2cdf5fa0522a5b3 (diff)
Add proxmox VE (with kernel helper) on pve.local
Diffstat (limited to 'roles/proxmox-ve')
-rw-r--r--roles/proxmox-ve/defaults/main.yml2
-rw-r--r--roles/proxmox-ve/meta/argument_specs.yml11
-rw-r--r--roles/proxmox-ve/meta/main.yml12
-rw-r--r--roles/proxmox-ve/tasks/main.yml44
4 files changed, 69 insertions, 0 deletions
diff --git a/roles/proxmox-ve/defaults/main.yml b/roles/proxmox-ve/defaults/main.yml
new file mode 100644
index 00000000..1fb51b74
--- /dev/null
+++ b/roles/proxmox-ve/defaults/main.yml
@@ -0,0 +1,2 @@
+---
+proxmox_ve_repo: "no-subscription"
diff --git a/roles/proxmox-ve/meta/argument_specs.yml b/roles/proxmox-ve/meta/argument_specs.yml
new file mode 100644
index 00000000..915bcc59
--- /dev/null
+++ b/roles/proxmox-ve/meta/argument_specs.yml
@@ -0,0 +1,11 @@
+---
+argument_specs:
+ main:
+ options:
+ proxmox_ve_repo:
+ type: "str"
+ description: "Proxmox VE apt repository type (no-subscription or enterprise)"
+ default: "no-subscription"
+ choices:
+ - "no-subscription"
+ - "enterprise"
diff --git a/roles/proxmox-ve/meta/main.yml b/roles/proxmox-ve/meta/main.yml
new file mode 100644
index 00000000..a116b3b9
--- /dev/null
+++ b/roles/proxmox-ve/meta/main.yml
@@ -0,0 +1,12 @@
+---
+dependencies:
+ - role: "proxmox-kernel-helper"
+galaxy_info:
+ author: "a14m"
+ description: "Install Proxmox VE on Debian"
+ license: "MIT"
+ min_ansible_version: "2.18"
+ platforms:
+ - name: "Debian"
+ versions:
+ - "bookworm"
diff --git a/roles/proxmox-ve/tasks/main.yml b/roles/proxmox-ve/tasks/main.yml
new file mode 100644
index 00000000..25067d43
--- /dev/null
+++ b/roles/proxmox-ve/tasks/main.yml
@@ -0,0 +1,44 @@
+---
+- name: "Configure Proxmox repos"
+ become: true
+ when: proxmox_ve_repo == "no-subscription"
+ block:
+ - name: "Configure no-subuscription repos"
+ ansible.builtin.apt_repository:
+ repo: "deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription"
+ state: "present"
+ filename: "pve-no-subscription"
+
+ - name: "Remove Proxmox enterprise repo"
+ become: true
+ ansible.builtin.file:
+ path: "/etc/apt/sources.list.d/pve-enterprise.list"
+ state: "absent"
+
+- name: "Install proxmox-ve"
+ become: true
+ ansible.builtin.apt:
+ name: "proxmox-ve"
+ state: "present"
+ update_cache: true
+
+- name: "Disable IPv6 on wlan0 (prevents PVE cert generation failures with zone IDs)"
+ become: true
+ ansible.posix.sysctl:
+ name: "net.ipv6.conf.wlan0.disable_ipv6"
+ value: "1"
+ state: "present"
+ sysctl_set: true
+ reload: true
+
+- name: "Enable and start Proxmox VE services"
+ become: true
+ ansible.builtin.systemd_service:
+ name: "{{ item }}"
+ enabled: true
+ state: "started"
+ loop:
+ - "pve-cluster"
+ - "pvedaemon"
+ - "pveproxy"
+ - "pvestatd"