Skip to content

Commit

Permalink
Merge pull request #291 from agross/develop
Browse files Browse the repository at this point in the history
Remove enterprise repos before adding new repos
  • Loading branch information
lae authored Feb 27, 2025
2 parents 8164c17 + 70a4ce6 commit 2f9dbfa
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 2f9dbfa

Please sign in to comment.