Skip to content

Commit

Permalink
Remove enterprise repos before adding new repos, closes #290
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
agross committed Feb 26, 2025
1 parent 8164c17 commit 70a4ce6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
13 changes: 5 additions & 8 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@
name: os-prober
state: absent

- ansible.builtin.import_tasks: remove_enterprise_repos.yml
when:
- "'pve-no-subscription' in pve_repository_line"

- name: Add Proxmox repository
apt_repository:
repo: "{{ pve_repository_line }}"
Expand Down Expand Up @@ -195,14 +199,7 @@
until: _proxmox_install is succeeded

- block:
- name: Remove automatically installed PVE Enterprise repo configuration
apt_repository:
repo: "{{ item }}"
filename: pve-enterprise
state: absent
with_items:
- "deb https://enterprise.proxmox.com/debian {{ ansible_distribution_release }} pve-enterprise"
- "deb https://enterprise.proxmox.com/debian/pve {{ ansible_distribution_release }} pve-enterprise"
- ansible.builtin.import_tasks: remove_enterprise_repos.yml

- name: Remove subscription check wrapper function in web UI
ansible.builtin.lineinfile:
Expand Down
10 changes: 10 additions & 0 deletions tasks/remove_enterprise_repos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
- name: Remove automatically installed PVE Enterprise repo configuration
ansible.builtin.apt_repository:
repo: "{{ item }}"
filename: pve-enterprise
state: absent
update_cache: false
with_items:
- "deb https://enterprise.proxmox.com/debian {{ ansible_distribution_release }} pve-enterprise"
- "deb https://enterprise.proxmox.com/debian/pve {{ ansible_distribution_release }} pve-enterprise"
- "deb https://enterprise.proxmox.com/debian/ceph-quincy {{ ansible_distribution_release }} enterprise"

0 comments on commit 70a4ce6

Please sign in to comment.