Skip to content

Commit

Permalink
Merge pull request #200 from ceph/mergify/bp/quincy/pr-199
Browse files Browse the repository at this point in the history
preflight: support IBM repositories installation (backport #199)
  • Loading branch information
guits authored Feb 17, 2023
2 parents 108efb4 + c1c3154 commit 2367f69
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 21 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
40 changes: 19 additions & 21 deletions cephadm-preflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,40 +50,38 @@
when: ansible_facts['distribution_major_version'] | int == 8

- 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_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 ceph community repository stable key
rpm_key:
key: "{{ ceph_stable_key }}"
state: present
register: result
until: result is succeeded

- name: configure ceph community stable repository
yum_repository:
name: ceph_stable
description: Ceph Stable $basearch repo
gpgcheck: yes
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 ceph community stable noarch 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 2367f69

Please sign in to comment.