Skip to content

Commit

Permalink
Merge pull request #231 from ceph/mergify/bp/reef/pr-230
Browse files Browse the repository at this point in the history
preflight: old repos disablement refactor (backport #230)
  • Loading branch information
guits authored Jul 12, 2023
2 parents 71bc2ac + cfd91a3 commit 6ca2a32
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
7 changes: 7 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
pull_request_rules:
# Backports
- actions:
backport:
branches:
- reef
conditions:
- label=backport-reef
name: backport reef
- actions:
backport:
branches:
Expand Down
13 changes: 7 additions & 6 deletions cephadm-preflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
- hosts: all
become: true
gather_facts: true
vars:
repos_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
- rhceph-5-tools-for-rhel-{{ ansible_facts['distribution_major_version'] }}-{{ ansible_facts['architecture'] }}-rpms
tasks:
- name: import_role ceph_defaults
import_role:
Expand All @@ -41,13 +47,8 @@

- name: disable older rhceph repositories if any
rhsm_repository:
name: "{{ item }}"
name: "{{ repos_to_disable }}"
state: absent
loop:
- rhceph-4-tools-for-rhel-8-{{ ansible_facts['architecture'] }}-rpms
- rhceph-4-mon-for-rhel-8-{{ ansible_facts['architecture'] }}-rpms
- rhceph-4-osd-for-rhel-8-{{ ansible_facts['architecture'] }}-rpms
when: ansible_facts['distribution_major_version'] | int == 8

- name: enable ceph package repositories
when: ceph_origin in ['community', 'ibm']
Expand Down

0 comments on commit 6ca2a32

Please sign in to comment.