diff --git a/roles/ceph-common/tasks/prerequisite_rh_storage_cdn_install.yml b/roles/ceph-common/tasks/prerequisite_rh_storage_cdn_install.yml index 52f09f814..62c1cc3ab 100644 --- a/roles/ceph-common/tasks/prerequisite_rh_storage_cdn_install.yml +++ b/roles/ceph-common/tasks/prerequisite_rh_storage_cdn_install.yml @@ -4,17 +4,41 @@ register: subscription changed_when: false +- 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 + register: rh_storage_mon_repo + when: mon_group_name in group_names + - name: enable red hat storage monitor repository command: subscription-manager repos --enable rhel-7-server-rhceph-1.3-mon-rpms changed_when: false - when: mon_group_name in group_names + when: + mon_group_name in group_names and + rh_storage_mon_repo.rc != 0 + +- name: check if the red hat storage osd repo is already present + shell: yum --noplugins --cacheonly repolist | grep -sq rhel-7-server-rhceph-1.3-mon-rpms + changed_when: false + register: rh_storage_osd_repo + when: osd_group_name in group_names - name: enable red hat storage osd repository command: subscription-manager repos --enable rhel-7-server-rhceph-1.3-osd-rpms changed_when: false - when: osd_group_name in group_names + when: + osd_group_name in group_names and + rh_storage_osd_repo.rc != 0 + +- name: check if the red hat storage rados gateway repo is already present + shell: yum --noplugins --cacheonly repolist | grep -sq rhel-7-server-rhceph-1.3-mon-rpms + changed_when: false + register: rh_storage_rgw_repo + when: rgw_group_name in group_names - name: enable red hat storage rados gateway repository command: subscription-manager repos --enable rhel-7-server-rhceph-1.3-tools-rpms changed_when: false - when: rgw_group_name in group_names + when: + rgw_group_name in group_names and + rh_storage_rgw_repo.rc != 0