-
Notifications
You must be signed in to change notification settings - Fork 0
/
proxmox_post_install.yml
43 lines (37 loc) · 1.18 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
---
- name: Post install for Proxmox
hosts: vhosts
become: yes
user: root
tasks:
- name: Backup sources.list
copy:
remote_src=True
src=/etc/apt/sources.list
dest=/etc/apt/sources.list.backup
- name: Disable Enterprise Sub
lineinfile:
path: /etc/apt/sources.list.d/pve-enterprise.list
regexp: '^deb https://enterprise.proxmox.com/debian/pve buster pve-enterprise'
line: '#deb https://enterprise.proxmox.com/debian/pve buster pve-enterprise'
- name: Add Community Sub
lineinfile:
path: /etc/apt/sources.list
regexp: '/^(.*)$/m'
insertbefore: '^deb http://ftp.us.debian.org/debian buster main contrib'
line: deb http://download.proxmox.com/debian buster pve-no-subscription
- name: Update & Upgrade
apt:
update_cache: yes
upgrade: dist
- name: Install ifupdown2
apt:
name: ifupdown2
state: present
- name: Remove nag
replace:
path: /usr/share/perl5/PVE/API2/Subscription.pm
regexp: 'NotFound'
replace: 'Active'
- name: Reboot System
reboot: