|
50 | 50 | rhsm_repository:
|
51 | 51 | name: "rhceph-{{ ceph_rhcs_version }}-tools-for-rhel-8-{{ ansible_facts['architecture'] }}-rpms"
|
52 | 52 |
|
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'] |
55 | 55 | 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 }}" |
62 | 63 |
|
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 }}" |
68 | 67 | 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' |
73 | 68 | register: result
|
74 | 69 | until: result is succeeded
|
75 | 70 |
|
76 |
| - - name: configure red hat ceph stable noarch community repository |
| 71 | + - name: configure ceph stable repository |
77 | 72 | yum_repository:
|
78 |
| - name: ceph_stable_noarch |
79 |
| - description: Ceph Stable noarch repo |
| 73 | + name: "ceph_stable_{{ item }}" |
| 74 | + description: "{{ _ceph_repo.description }} - {{ item }}" |
80 | 75 | gpgcheck: yes
|
81 | 76 | 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 }}" |
85 | 80 | priority: '2'
|
86 | 81 | register: result
|
87 | 82 | until: result is succeeded
|
| 83 | + loop: |
| 84 | + - "$basearch" |
| 85 | + - "noarch" |
88 | 86 |
|
89 | 87 | - name: enable repo from shaman - dev
|
90 | 88 | when: ceph_origin == 'shaman'
|
|
0 commit comments