Skip to content

Commit

Permalink
Ceph 4 repositories are not available on RHEL9
Browse files Browse the repository at this point in the history
Older ceph-4 repositories removal fails on RHEL9 as ceph 4 is
not available on that version of the OS.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2250583

Signed-off-by: Teoman ONAY <[email protected]>
  • Loading branch information
asm0deuz committed Nov 21, 2023
1 parent 8450e52 commit f6b11fc
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions cephadm-preflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@
become: true
gather_facts: true
vars:
repos_to_disable:
repos_4_to_disable:
- rhceph-4-tools-for-rhel-{{ ansible_facts['distribution_major_version'] }}-{{ ansible_facts['architecture'] }}-rpms
- rhceph-4-mon-for-rhel-{{ ansible_facts['distribution_major_version'] }}-{{ ansible_facts['architecture'] }}-rpms
- rhceph-4-osd-for-rhel-{{ ansible_facts['distribution_major_version'] }}-{{ ansible_facts['architecture'] }}-rpms
repos_5_to_disable:
- rhceph-5-tools-for-rhel-{{ ansible_facts['distribution_major_version'] }}-{{ ansible_facts['architecture'] }}-rpms
packages_to_uninstall:
- ceph-mds
Expand All @@ -52,9 +53,16 @@
rhsm_repository:
name: "rhceph-{{ ceph_rhcs_version }}-tools-for-rhel-{{ ansible_facts['distribution_major_version'] }}-{{ ansible_facts['architecture'] }}-rpms"

- name: disable older rhceph repositories if any
- name: disable older rhceph repositories if any on RHEL{{ansible_facts['distribution_major_version']}}
when: ansible_facts['distribution_major_version'] == '8'
rhsm_repository:
name: "{{ repos_to_disable }}"
name: "{{ repos_4_to_disable + repos_5_to_disable }}"
state: absent

- name: disable older rhceph repositories if any on RHEL{{ansible_facts['distribution_major_version']}}
when: ansible_facts['distribution_major_version'] == '9'
rhsm_repository:
name: "{{ repos_5_to_disable }}"
state: absent

- name: enable ceph package repositories
Expand Down

0 comments on commit f6b11fc

Please sign in to comment.