-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproxmox-post-install.yml
63 lines (51 loc) · 1.64 KB
/
proxmox-post-install.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
---
- name: Post Install - Configure Proxmox VE
hosts: proxmox
become: true
tasks:
- name: Disable Proxmox enterprise repository
lineinfile:
path: /etc/apt/sources.list.d/pve-enterprise.list
regexp: '^deb .*'
line: '# deb https://enterprise.proxmox.com/debian/pve bookworm pve-enterprise'
state: present
- name: Remove Ceph enterprise repository
file:
path: /etc/apt/sources.list.d/ceph.list
state: absent
- name: Add Proxmox non-subscription repository
copy:
dest: /etc/apt/sources.list.d/pve-no-subscription.list
content: |
deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription
- name: Add Proxmox keyring
apt_key:
url: https://enterprise.proxmox.com/debian/proxmox-release-bookworm.gpg
state: present
- name: Update package lists
apt:
update_cache: yes
- name: Upgrade the system
apt:
upgrade: dist
- name: Install common tools
apt:
name: # Add/Remove whatever you want.
- wget
- curl
- git
state: present
- name: Set hostname
hostname:
name: overlord
- name: Remove subscription nag banner
shell: |
echo "DPkg::Post-Invoke { \"rm -f /var/lib/apt/lists/partial/*pve-enterprise*\"; };" > /etc/apt/apt.conf.d/99pvebanner
args:
creates: /etc/apt/apt.conf.d/99pvebanner
- name: Reboot the server
reboot:
msg: "Reboot initiated by Ansible post-install playbook"
- name: Wait for server to come back online
wait_for_connection:
timeout: 300