Skip to content

Commit 3b7dfc2

Browse files
authoredFeb 17, 2023
Merge pull request #201 from ceph/mergify/bp/pacific/pr-199
preflight: support IBM repositories installation (backport #199)
2 parents 5539cba + ead1745 commit 3b7dfc2

File tree

2 files changed

+25
-23
lines changed

2 files changed

+25
-23
lines changed
 

‎ceph_defaults/defaults/main.yml

+4
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@ ceph_origin: community
33
ceph_dev_branch: main
44
ceph_dev_sha1: latest
55
ceph_rhcs_version: 5
6+
ceph_ibm_version: 5
67
ceph_mirror: https://download.ceph.com
78
ceph_stable_key: https://download.ceph.com/keys/release.asc
89
ceph_release: pacific
10+
ceph_community_repo_baseurl: "{{ ceph_mirror }}/rpm-{{ ceph_release }}/el{{ ansible_facts['distribution_major_version'] }}/"
11+
ceph_ibm_repo_baseurl: "https://public.dhe.ibm.com/ibmdl/export/pub/storage/ceph/{{ ceph_ibm_version }}/rhel{{ ansible_facts['distribution_major_version'] }}/"
12+
ceph_ibm_key: https://public.dhe.ibm.com/ibmdl/export/pub/storage/ceph/{{ ceph_ibm_version }}/rhel{{ ansible_facts['distribution_major_version'] }}/ibm-key.asc
913
upgrade_ceph_packages: false
1014
ceph_pkgs:
1115
- chrony

‎cephadm-preflight.yml

+21-23
Original file line numberDiff line numberDiff line change
@@ -50,41 +50,39 @@
5050
rhsm_repository:
5151
name: "rhceph-{{ ceph_rhcs_version }}-tools-for-rhel-8-{{ ansible_facts['architecture'] }}-rpms"
5252

53-
- name: enable repo from download.ceph.com
54-
when: ceph_origin == 'community'
53+
- name: enable ceph package repositories
54+
when: ceph_origin in ['community', 'ibm']
5555
block:
56-
- name: configure red hat ceph community repository stable key
57-
rpm_key:
58-
key: "{{ ceph_stable_key }}"
59-
state: present
60-
register: result
61-
until: result is succeeded
56+
- name: set_fact _ceph_repo
57+
set_fact:
58+
_ceph_repo:
59+
name: ceph_stable
60+
description: "{{ 'Ceph Stable repo' if ceph_origin == 'community' else 'IBM Ceph repo' }}"
61+
rpm_key: "{{ ceph_stable_key if ceph_origin == 'community' else ceph_ibm_key }}"
62+
baseurl: "{{ ceph_community_repo_baseurl if ceph_origin == 'community' else ceph_ibm_repo_baseurl }}"
6263

63-
- name: configure red hat ceph stable community repository
64-
yum_repository:
65-
name: ceph_stable
66-
description: Ceph Stable $basearch repo
67-
gpgcheck: yes
64+
- name: configure ceph repository key
65+
rpm_key:
66+
key: "{{ _ceph_repo.rpm_key }}"
6867
state: present
69-
gpgkey: "{{ ceph_stable_key }}"
70-
baseurl: "{{ ceph_mirror }}/rpm-{{ ceph_release }}/el{{ ansible_facts['distribution_major_version'] }}/$basearch"
71-
file: ceph_stable
72-
priority: '2'
7368
register: result
7469
until: result is succeeded
7570

76-
- name: configure red hat ceph stable noarch community repository
71+
- name: configure ceph stable repository
7772
yum_repository:
78-
name: ceph_stable_noarch
79-
description: Ceph Stable noarch repo
73+
name: "ceph_stable_{{ item }}"
74+
description: "{{ _ceph_repo.description }} - {{ item }}"
8075
gpgcheck: yes
8176
state: present
82-
gpgkey: "{{ ceph_stable_key }}"
83-
baseurl: "{{ ceph_mirror }}/rpm-{{ ceph_release }}/el{{ ansible_facts['distribution_major_version'] }}/noarch"
84-
file: ceph_stable
77+
gpgkey: "{{ _ceph_repo.rpm_key }}"
78+
baseurl: "{{ _ceph_repo.baseurl }}/{{ item }}"
79+
file: "ceph_stable_{{ item }}"
8580
priority: '2'
8681
register: result
8782
until: result is succeeded
83+
loop:
84+
- "$basearch"
85+
- "noarch"
8886

8987
- name: enable repo from shaman - dev
9088
when: ceph_origin == 'shaman'

0 commit comments

Comments
 (0)
Please sign in to comment.