From 2f09eed0e0e712013d10d9408285d5aa83931a5a Mon Sep 17 00:00:00 2001 From: Dimitri Savineau Date: Fri, 31 Jan 2020 08:59:21 -0500 Subject: [PATCH] ceph-common: rhcs 4 repositories for rhel 7 RHCS 4 is available for both RHEL 7 and 8 so we should also enable the cdn repositories for that distribution. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1796853 Signed-off-by: Dimitri Savineau --- group_vars/all.yml.sample | 2 +- group_vars/rhcs.yml.sample | 2 +- .../prerequisite_rhcs_cdn_install.yml | 49 +++++++++++++------ roles/ceph-defaults/defaults/main.yml | 2 +- 4 files changed, 38 insertions(+), 17 deletions(-) diff --git a/group_vars/all.yml.sample b/group_vars/all.yml.sample index ccd6274ca6..81716f174d 100644 --- a/group_vars/all.yml.sample +++ b/group_vars/all.yml.sample @@ -174,7 +174,7 @@ dummy: # # Enabled when ceph_repository == 'rhcs' # -# This version is only supported on RHEL >= 8.0 +# This version is supported on RHEL 7 and 8 # #ceph_rhcs_version: "{{ ceph_stable_rh_storage_version | default(4) }}" #valid_ceph_repository_type: diff --git a/group_vars/rhcs.yml.sample b/group_vars/rhcs.yml.sample index 5aabf9f901..1df810051d 100644 --- a/group_vars/rhcs.yml.sample +++ b/group_vars/rhcs.yml.sample @@ -174,7 +174,7 @@ ceph_repository: rhcs # # Enabled when ceph_repository == 'rhcs' # -# This version is only supported on RHEL >= 8.0 +# This version is supported on RHEL 7 and 8 # ceph_rhcs_version: 4 #valid_ceph_repository_type: diff --git a/roles/ceph-common/tasks/installs/prerequisite_rhcs_cdn_install.yml b/roles/ceph-common/tasks/installs/prerequisite_rhcs_cdn_install.yml index 531e44f9d3..50e7eb5db2 100644 --- a/roles/ceph-common/tasks/installs/prerequisite_rhcs_cdn_install.yml +++ b/roles/ceph-common/tasks/installs/prerequisite_rhcs_cdn_install.yml @@ -1,15 +1,36 @@ --- -- name: enable red hat storage monitor repository - rhsm_repository: - name: "rhceph-{{ ceph_rhcs_version }}-mon-for-rhel-8-{{ ansible_architecture }}-rpms" - when: (mon_group_name in group_names or mgr_group_name in group_names) - -- name: enable red hat storage osd repository - rhsm_repository: - name: "rhceph-{{ ceph_rhcs_version }}-osd-for-rhel-8-{{ ansible_architecture }}-rpms" - when: osd_group_name in group_names - -- name: enable red hat storage tools repository - rhsm_repository: - name: "rhceph-{{ ceph_rhcs_version }}-tools-for-rhel-8-{{ ansible_architecture }}-rpms" - when: (rgw_group_name in group_names or mds_group_name in group_names or nfs_group_name in group_names or iscsi_gw_group_name in group_names or client_group_name in group_names) +- name: "rhcs {{ ceph_rhcs_version }} on rhel 8" + when: ansible_distribution_major_version | int == 8 + block: + - name: enable red hat storage monitor repository + rhsm_repository: + name: "rhceph-{{ ceph_rhcs_version }}-mon-for-rhel-8-{{ ansible_architecture }}-rpms" + when: (mon_group_name in group_names or mgr_group_name in group_names) + + - name: enable red hat storage osd repository + rhsm_repository: + name: "rhceph-{{ ceph_rhcs_version }}-osd-for-rhel-8-{{ ansible_architecture }}-rpms" + when: osd_group_name in group_names + + - name: enable red hat storage tools repository + rhsm_repository: + name: "rhceph-{{ ceph_rhcs_version }}-tools-for-rhel-8-{{ ansible_architecture }}-rpms" + when: (rgw_group_name in group_names or mds_group_name in group_names or nfs_group_name in group_names or iscsi_gw_group_name in group_names or client_group_name in group_names) + +- name: "rhcs {{ ceph_rhcs_version }} on rhel 7" + when: ansible_distribution_major_version | int == 7 + block: + - name: enable red hat storage monitor repository + rhsm_repository: + name: "rhel-7-server-rhceph-{{ ceph_rhcs_version }}-mon-rpms" + when: (mon_group_name in group_names or mgr_group_name in group_names) + + - name: enable red hat storage osd repository + rhsm_repository: + name: "rhel-7-server-rhceph-{{ ceph_rhcs_version }}-osd-rpms" + when: osd_group_name in group_names + + - name: enable red hat storage tools repository + rhsm_repository: + name: "rhel-7-server-rhceph-{{ ceph_rhcs_version }}-tools-rpms" + when: (rgw_group_name in group_names or mds_group_name in group_names or nfs_group_name in group_names or iscsi_gw_group_name in group_names or client_group_name in group_names) diff --git a/roles/ceph-defaults/defaults/main.yml b/roles/ceph-defaults/defaults/main.yml index 875666a754..c0b6a232ba 100644 --- a/roles/ceph-defaults/defaults/main.yml +++ b/roles/ceph-defaults/defaults/main.yml @@ -166,7 +166,7 @@ ceph_stable_redhat_distro: el7 # # Enabled when ceph_repository == 'rhcs' # -# This version is only supported on RHEL >= 8.0 +# This version is supported on RHEL 7 and 8 # ceph_rhcs_version: "{{ ceph_stable_rh_storage_version | default(4) }}" valid_ceph_repository_type: