Skip to content

Commit 70a4ce6

Browse files
committed
Remove enterprise repos before adding new repos, closes #290
* Every removal would trigger "apt update" with the remaining (inaccessible) repos, add an extra update_cache: false. * https://enterprise.proxmox.com/debian/ceph-quincy is configured on a fresh Proxmox 8.x install.
1 parent 8164c17 commit 70a4ce6

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

tasks/main.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@
132132
name: os-prober
133133
state: absent
134134

135+
- ansible.builtin.import_tasks: remove_enterprise_repos.yml
136+
when:
137+
- "'pve-no-subscription' in pve_repository_line"
138+
135139
- name: Add Proxmox repository
136140
apt_repository:
137141
repo: "{{ pve_repository_line }}"
@@ -195,14 +199,7 @@
195199
until: _proxmox_install is succeeded
196200

197201
- block:
198-
- name: Remove automatically installed PVE Enterprise repo configuration
199-
apt_repository:
200-
repo: "{{ item }}"
201-
filename: pve-enterprise
202-
state: absent
203-
with_items:
204-
- "deb https://enterprise.proxmox.com/debian {{ ansible_distribution_release }} pve-enterprise"
205-
- "deb https://enterprise.proxmox.com/debian/pve {{ ansible_distribution_release }} pve-enterprise"
202+
- ansible.builtin.import_tasks: remove_enterprise_repos.yml
206203

207204
- name: Remove subscription check wrapper function in web UI
208205
ansible.builtin.lineinfile:

tasks/remove_enterprise_repos.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
- name: Remove automatically installed PVE Enterprise repo configuration
2+
ansible.builtin.apt_repository:
3+
repo: "{{ item }}"
4+
filename: pve-enterprise
5+
state: absent
6+
update_cache: false
7+
with_items:
8+
- "deb https://enterprise.proxmox.com/debian {{ ansible_distribution_release }} pve-enterprise"
9+
- "deb https://enterprise.proxmox.com/debian/pve {{ ansible_distribution_release }} pve-enterprise"
10+
- "deb https://enterprise.proxmox.com/debian/ceph-quincy {{ ansible_distribution_release }} enterprise"

0 commit comments

Comments
 (0)