Skip to content

Commit

Permalink
Merge pull request #201 from ceph/mergify/bp/pacific/pr-199
Browse files Browse the repository at this point in the history
preflight: support IBM repositories installation (backport #199)
  • Loading branch information
andrewschoen authored Feb 17, 2023
2 parents 5539cba + ead1745 commit 3b7dfc2
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 23 deletions.
4 changes: 4 additions & 0 deletions ceph_defaults/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ ceph_origin: community
ceph_dev_branch: main
ceph_dev_sha1: latest
ceph_rhcs_version: 5
ceph_ibm_version: 5
ceph_mirror: https://download.ceph.com
ceph_stable_key: https://download.ceph.com/keys/release.asc
ceph_release: pacific
ceph_community_repo_baseurl: "{{ ceph_mirror }}/rpm-{{ ceph_release }}/el{{ ansible_facts['distribution_major_version'] }}/"
ceph_ibm_repo_baseurl: "https://public.dhe.ibm.com/ibmdl/export/pub/storage/ceph/{{ ceph_ibm_version }}/rhel{{ ansible_facts['distribution_major_version'] }}/"
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
upgrade_ceph_packages: false
ceph_pkgs:
- chrony
Expand Down
44 changes: 21 additions & 23 deletions cephadm-preflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,41 +50,39 @@
rhsm_repository:
name: "rhceph-{{ ceph_rhcs_version }}-tools-for-rhel-8-{{ ansible_facts['architecture'] }}-rpms"

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

- name: configure red hat ceph stable community repository
yum_repository:
name: ceph_stable
description: Ceph Stable $basearch repo
gpgcheck: yes
- name: configure ceph repository key
rpm_key:
key: "{{ _ceph_repo.rpm_key }}"
state: present
gpgkey: "{{ ceph_stable_key }}"
baseurl: "{{ ceph_mirror }}/rpm-{{ ceph_release }}/el{{ ansible_facts['distribution_major_version'] }}/$basearch"
file: ceph_stable
priority: '2'
register: result
until: result is succeeded

- name: configure red hat ceph stable noarch community repository
- name: configure ceph stable repository
yum_repository:
name: ceph_stable_noarch
description: Ceph Stable noarch repo
name: "ceph_stable_{{ item }}"
description: "{{ _ceph_repo.description }} - {{ item }}"
gpgcheck: yes
state: present
gpgkey: "{{ ceph_stable_key }}"
baseurl: "{{ ceph_mirror }}/rpm-{{ ceph_release }}/el{{ ansible_facts['distribution_major_version'] }}/noarch"
file: ceph_stable
gpgkey: "{{ _ceph_repo.rpm_key }}"
baseurl: "{{ _ceph_repo.baseurl }}/{{ item }}"
file: "ceph_stable_{{ item }}"
priority: '2'
register: result
until: result is succeeded
loop:
- "$basearch"
- "noarch"

- name: enable repo from shaman - dev
when: ceph_origin == 'shaman'
Expand Down

0 comments on commit 3b7dfc2

Please sign in to comment.