-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: John Helmert III <jchelmert3@posteo.net>
- Loading branch information
Showing
2 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
ansible_python_interpreter: /usr/bin/python3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#!/usr/bin/env ansible-playbook | ||
--- | ||
# 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 |