Skip to content

Commit

Permalink
preflight: support IBM repositories installation
Browse files Browse the repository at this point in the history
This makes the preflight playbook support IBM repositories.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
(cherry picked from commit 8037884)
  • Loading branch information
guits authored and mergify[bot] committed Feb 17, 2023
1 parent 108efb4 commit 89a34d4
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 19 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,8 +3,12 @@ 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_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/5/rhel8/ibm-key.asc
ceph_release: quincy
upgrade_ceph_packages: false
ceph_pkgs:
Expand Down
38 changes: 19 additions & 19 deletions cephadm-preflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,41 +49,41 @@
- rhceph-4-osd-for-rhel-8-{{ ansible_facts['architecture'] }}-rpms
when: ansible_facts['distribution_major_version'] | int == 8


# https://public.dhe.ibm.com/ibmdl/export/pub/storage/ceph/5/rhel8/$basearch/
- name: enable repo from download.ceph.com
when: ceph_origin == 'community'
when: ceph_origin in ['community', 'ibm']
block:
- name: set_fact _ceph_repo
set_fact:
_ceph_repos:
- 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 ceph community repository stable key
rpm_key:
key: "{{ ceph_stable_key }}"
key: "{{ _ceph_repo.rpm_key }}"
state: present
register: result
until: result is succeeded

- name: configure ceph community stable repository
- name: configure ceph stable repository
yum_repository:
name: ceph_stable
description: Ceph Stable $basearch repo
gpgcheck: yes
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 ceph community stable noarch repository
yum_repository:
name: ceph_stable_noarch
description: Ceph Stable noarch repo
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"
gpgkey: "{{ _ceph_repo.rpm_key }}"
baseurl: "{{ _ceph_repo.baseurl }}/{{ item }}"
file: ceph_stable
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 89a34d4

Please sign in to comment.