Debian did, Proxmox did, now we did too. Also enable ceph repository if ceph-version is set in config context.
33 lines
1.1 KiB
YAML
33 lines
1.1 KiB
YAML
- 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
|