diff --git a/roles/ceph-common/tasks/pre_requisites/prerequisite_rh_storage_cdn_install.yml b/roles/ceph-common/tasks/pre_requisites/prerequisite_rh_storage_cdn_install.yml index 1879f38bb..5571c6400 100644 --- a/roles/ceph-common/tasks/pre_requisites/prerequisite_rh_storage_cdn_install.yml +++ b/roles/ceph-common/tasks/pre_requisites/prerequisite_rh_storage_cdn_install.yml @@ -4,6 +4,17 @@ register: subscription changed_when: false +- name: check if the red hat optional repo is present + shell: yum --noplugins --cacheonly repolist | grep -sq rhel-7-server-optional-rpms + changed_when: false + failed_when: false + register: rh_optional_repo + +- name: enable red hat optional repository + command: subscription-manager repos --enable rhel-7-server-optional-rpms + changed_when: false + when: rh_optional_repo.rc != 0 + - name: check if the red hat storage monitor repo is already present shell: yum --noplugins --cacheonly repolist | grep -sq rhel-7-server-rhceph-1.3-mon-rpms changed_when: false