Skip to content

Commit

Permalink
add proxmox installation playbook
Browse files Browse the repository at this point in the history
Signed-off-by: John Helmert III <jchelmert3@posteo.net>
  • Loading branch information
ajakk committed Dec 26, 2024
1 parent 3ad31af commit 503c6f5
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
2 changes: 2 additions & 0 deletions group_vars/proxmox.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
ansible_python_interpreter: /usr/bin/python3
67 changes: 67 additions & 0 deletions install_proxmox.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
#!/usr/bin/env ansible-playbook

Check failure on line 1 in install_proxmox.yml

View workflow job for this annotation

GitHub Actions / build

internal-error

Unexpected error code 1 from execution of: ansible-playbook --syntax-check install_proxmox.yml
---
# install proxmox on top of debian 12 according to:
# https://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_12_Bookworm
- name: Install + configure proxmox
hosts: proxmox
user: root
tasks:
- name: Fetch proxmox gpg key
ansible.builtin.get_url:
url: https://enterprise.proxmox.com/debian/proxmox-release-bookworm.gpg
dest: /etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg
# yamllint disable rule:line-length
checksum: sha512:7da6fe34168adc6e479327ba517796d4702fa2f8b4f0a9833f5ea6e6b48f6507a6da403a274fe201595edc86a84463d50383d07f64bdde2e3658108db7d6dc87
# yamllint enable rule:line-length
owner: root
group: root
mode: "0644"
- name: Add Proxmox repository
ansible.builtin.apt_repository:
filename: proxmox
# yamllint disable rule:line-length
repo: deb [arch=amd64] http://download.proxmox.com/debian/pve bookworm pve-no-subscription
# yamllint enable rule:line-length
state: present
- name: Upgrade
ansible.builtin.apt:
update_cache: true
upgrade: full
- name: Install proxmox kernel
ansible.builtin.apt:
name: proxmox-default-kernel
state: present
- name: Inform the user to reboot if necessary
when: 'not "pve" in ansible_kernel'
ansible.builtin.debug:
msg: "Need to reboot into PVE kernel!"
- name: Install packages which depend on pve kernel
when: '"pve" in ansible_kernel'
ansible.builtin.apt:
name:
- chrony
- open-iscsi
- postfix
- proxmox-ve
state: present
- name: Remove debian packages
when: '"pve" in ansible_kernel'
ansible.builtin.apt:
name:
- linux-image-amd64
- 'linux-image-6.1*'
- os-prober
state: absent
- name: Install misc useful packages
ansible.builtin.apt:
name:
- btop
- htop
- ipmitool
- ncdu
- nut
- python3
- stress-ng
- tmux
- vim
state: present

0 comments on commit 503c6f5

Please # to comment.