Skip to content

Commit 6ca2a32

Browse files
authored
Merge pull request #231 from ceph/mergify/bp/reef/pr-230
preflight: old repos disablement refactor (backport #230)
2 parents 71bc2ac + cfd91a3 commit 6ca2a32

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

.mergify.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
pull_request_rules:
22
# Backports
3+
- actions:
4+
backport:
5+
branches:
6+
- reef
7+
conditions:
8+
- label=backport-reef
9+
name: backport reef
310
- actions:
411
backport:
512
branches:

cephadm-preflight.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@
2424
- hosts: all
2525
become: true
2626
gather_facts: true
27+
vars:
28+
repos_to_disable:
29+
- rhceph-4-tools-for-rhel-{{ ansible_facts['distribution_major_version'] }}-{{ ansible_facts['architecture'] }}-rpms
30+
- rhceph-4-mon-for-rhel-{{ ansible_facts['distribution_major_version'] }}-{{ ansible_facts['architecture'] }}-rpms
31+
- rhceph-4-osd-for-rhel-{{ ansible_facts['distribution_major_version'] }}-{{ ansible_facts['architecture'] }}-rpms
32+
- rhceph-5-tools-for-rhel-{{ ansible_facts['distribution_major_version'] }}-{{ ansible_facts['architecture'] }}-rpms
2733
tasks:
2834
- name: import_role ceph_defaults
2935
import_role:
@@ -41,13 +47,8 @@
4147

4248
- name: disable older rhceph repositories if any
4349
rhsm_repository:
44-
name: "{{ item }}"
50+
name: "{{ repos_to_disable }}"
4551
state: absent
46-
loop:
47-
- rhceph-4-tools-for-rhel-8-{{ ansible_facts['architecture'] }}-rpms
48-
- rhceph-4-mon-for-rhel-8-{{ ansible_facts['architecture'] }}-rpms
49-
- rhceph-4-osd-for-rhel-8-{{ ansible_facts['architecture'] }}-rpms
50-
when: ansible_facts['distribution_major_version'] | int == 8
5152

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

0 commit comments

Comments
 (0)