proxmox: switch to deb822 source format
Debian did, Proxmox did, now we did too. Also enable ceph repository if ceph-version is set in config context.
This commit is contained in:
parent
937c75e097
commit
59c1431f93
2 changed files with 34 additions and 17 deletions
|
@ -32,23 +32,7 @@
|
|||
|
||||
- include_tasks: network.yml
|
||||
|
||||
- name: Disable enterprise repositories
|
||||
apt_repository:
|
||||
repo: '{{ item }}'
|
||||
state: absent
|
||||
update_cache: no
|
||||
loop:
|
||||
- 'deb https://enterprise.proxmox.com/debian/pve {{ ansible_distribution_release }} pve-enterprise'
|
||||
- 'deb https://enterprise.proxmox.com/debian/ceph-quincy {{ ansible_distribution_release }} enterprise'
|
||||
notify: update package cache
|
||||
|
||||
- name: Enable no-subscription repository
|
||||
apt_repository:
|
||||
repo: 'deb http://download.proxmox.com/debian/pve {{ ansible_distribution_release }} pve-no-subscription'
|
||||
update_cache: no
|
||||
notify: update package cache
|
||||
|
||||
- meta: flush_handlers
|
||||
- include_tasks: repositories.yml
|
||||
|
||||
- name: Install essential packages
|
||||
package:
|
||||
|
|
33
roles/proxmox/tasks/repositories.yml
Normal file
33
roles/proxmox/tasks/repositories.yml
Normal file
|
@ -0,0 +1,33 @@
|
|||
- name: Disable enterprise repositories
|
||||
deb822_repository:
|
||||
name: pve-enterprise
|
||||
state: absent
|
||||
notify: update package cache
|
||||
|
||||
- name: Enable no-subscription repositories
|
||||
deb822_repository:
|
||||
name: proxmox
|
||||
uris: http://download.proxmox.com/debian/pve
|
||||
suites: "{{ ansible_distribution_release }}"
|
||||
components: pve-no-subscription
|
||||
signed_by: /usr/share/keyrings/proxmox-archive-keyring.gpg
|
||||
notify: update package cache
|
||||
|
||||
- name: Disable ceph repositories if not needed
|
||||
when: "'ceph-version' not in hostvars[inventory_hostname]"
|
||||
deb822_repository:
|
||||
name: ceph
|
||||
state: absent
|
||||
notify: update package cache
|
||||
|
||||
- name: Enable no-subscription ceph repositories
|
||||
when: "'ceph-version' in hostvars[inventory_hostname]"
|
||||
deb822_repository:
|
||||
name: ceph
|
||||
uris: "http://download.proxmox.com/debian/ceph-{{ hostvars[inventory_hostname]['ceph-version'] }}"
|
||||
suites: "{{ ansible_distribution_release }}"
|
||||
components: no-subscription
|
||||
signed_by: /usr/share/keyrings/proxmox-archive-keyring.gpg
|
||||
notify: update package cache
|
||||
|
||||
- meta: flush_handlers
|
Loading…
Add table
Add a link
Reference in a new issue