summaryrefslogtreecommitdiffstats
path: root/roles/proxmox-ve
diff options
context:
space:
mode:
Diffstat (limited to 'roles/proxmox-ve')
-rw-r--r--roles/proxmox-ve/defaults/main.yml4
-rw-r--r--roles/proxmox-ve/handlers/main.yml6
-rw-r--r--roles/proxmox-ve/meta/argument_specs.yml19
-rw-r--r--roles/proxmox-ve/meta/main.yml12
-rw-r--r--roles/proxmox-ve/tasks/main.yml89
5 files changed, 0 insertions, 130 deletions
diff --git a/roles/proxmox-ve/defaults/main.yml b/roles/proxmox-ve/defaults/main.yml
deleted file mode 100644
index e56c830b..00000000
--- a/roles/proxmox-ve/defaults/main.yml
+++ /dev/null
@@ -1,4 +0,0 @@
----
-proxmox_ve_repo: "no-subscription"
-proxmox_ve_admin_user: "admin"
-proxmox_ve_admin_password: "changeme"
diff --git a/roles/proxmox-ve/handlers/main.yml b/roles/proxmox-ve/handlers/main.yml
deleted file mode 100644
index ccce330d..00000000
--- a/roles/proxmox-ve/handlers/main.yml
+++ /dev/null
@@ -1,6 +0,0 @@
----
-- name: "Restart pveproxy"
- become: true
- ansible.builtin.systemd_service:
- name: "pveproxy"
- state: "restarted"
diff --git a/roles/proxmox-ve/meta/argument_specs.yml b/roles/proxmox-ve/meta/argument_specs.yml
deleted file mode 100644
index adf6e105..00000000
--- a/roles/proxmox-ve/meta/argument_specs.yml
+++ /dev/null
@@ -1,19 +0,0 @@
----
-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"
- proxmox_ve_admin_user:
- type: "str"
- description: "PVE realm admin username"
- default: "admin"
- proxmox_ve_admin_password:
- type: "str"
- description: "PVE realm admin password"
- default: "changeme"
diff --git a/roles/proxmox-ve/meta/main.yml b/roles/proxmox-ve/meta/main.yml
deleted file mode 100644
index a116b3b9..00000000
--- a/roles/proxmox-ve/meta/main.yml
+++ /dev/null
@@ -1,12 +0,0 @@
----
-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
deleted file mode 100644
index b7378a12..00000000
--- a/roles/proxmox-ve/tasks/main.yml
+++ /dev/null
@@ -1,89 +0,0 @@
----
-- name: "Install proxmox-ve"
- become: true
- ansible.builtin.apt:
- 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
- when: proxmox_ve_repo == "no-subscription"
- block:
- - name: "Configure no-subscription repos"
- ansible.builtin.apt_repository:
- repo: "deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription"
- state: "present"
- filename: "pve-no-subscription"
- mode: "0644"
-
- - name: "Remove Proxmox enterprise repo"
- become: true
- ansible.builtin.file:
- path: "/etc/apt/sources.list.d/pve-enterprise.list"
- state: "absent"
-
- - name: "Ensure sources.list is world-readable"
- become: true
- ansible.builtin.file:
- path: "/etc/apt/sources.list"
- mode: "0644"
- tags:
- - molecule-notest
-
-- name: "Set management IP in /etc/hosts for PVE cert generation"
- become: 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: "Create PVE admin user"
- become: true
- ansible.builtin.command:
- cmd: "pveum user add {{ proxmox_ve_admin_user }}@pve"
- register: pveum_user_add
- changed_when: pveum_user_add.rc == 0
- failed_when: pveum_user_add.rc != 0 and 'already exists' not in pveum_user_add.stderr
- tags:
- - "molecule-notest"
-
-- name: "Set PVE admin user password"
- become: true
- no_log: true
- ansible.builtin.command:
- cmd: "pveum passwd {{ proxmox_ve_admin_user }}@pve --password {{ proxmox_ve_admin_password }}"
- changed_when: true
- tags:
- - "molecule-notest"
-
-- name: "Grant PVE Administrator role"
- become: true
- ansible.builtin.command:
- cmd: "pveum acl modify / --roles Administrator --users {{ proxmox_ve_admin_user }}@pve"
- changed_when: true
- tags:
- - "molecule-notest"
-
-- 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"
- tags:
- # Since proxmox-ve package was ignored from testing, we need to ignore this too
- - "molecule-notest"