2015-07-03 00:23:11 +08:00
---
2015-07-06 23:14:07 +08:00
- name : check if the red hat storage monitor repo is already present
2016-08-12 23:30:41 +08:00
shell : yum --noplugins --cacheonly repolist | grep -sq rhel-7-server-rhceph-{{ ceph_rhcs_version }}-mon-rpms
2015-07-06 23:14:07 +08:00
changed_when : false
2015-07-29 00:21:15 +08:00
failed_when : false
2016-12-20 20:47:44 +08:00
register : rhcs_mon_repo
2017-10-25 22:53:34 +08:00
check_mode : no
2017-09-15 06:48:53 +08:00
when :
- mon_group_name in group_names
2015-07-06 23:14:07 +08:00
2015-07-03 00:23:11 +08:00
- name : enable red hat storage monitor repository
2016-08-12 23:30:41 +08:00
command : subscription-manager repos --enable rhel-7-server-rhceph-{{ ceph_rhcs_version }}-mon-rpms
2015-07-06 23:03:31 +08:00
changed_when : false
2015-07-06 23:14:07 +08:00
when :
2016-05-09 22:08:33 +08:00
- mon_group_name in group_names
2016-12-20 20:47:44 +08:00
- rhcs_mon_repo.rc != 0
2015-07-06 23:14:07 +08:00
- name : check if the red hat storage osd repo is already present
2016-08-12 23:30:41 +08:00
shell : yum --noplugins --cacheonly repolist | grep -sq rhel-7-server-rhceph-{{ ceph_rhcs_version }}-osd-rpms
2015-07-06 23:14:07 +08:00
changed_when : false
2015-07-29 00:21:15 +08:00
failed_when : false
2016-12-20 20:47:44 +08:00
register : rhcs_osd_repo
2017-10-25 22:53:34 +08:00
check_mode : no
2017-09-15 06:48:53 +08:00
when :
- osd_group_name in group_names
2015-07-03 00:23:11 +08:00
- name : enable red hat storage osd repository
2016-08-12 23:30:41 +08:00
command : subscription-manager repos --enable rhel-7-server-rhceph-{{ ceph_rhcs_version }}-osd-rpms
2015-07-06 23:03:31 +08:00
changed_when : false
2015-07-06 23:14:07 +08:00
when :
2016-05-09 22:08:33 +08:00
- osd_group_name in group_names
2016-12-20 20:47:44 +08:00
- rhcs_osd_repo.rc != 0
2015-07-06 23:14:07 +08:00
2018-04-12 18:15:35 +08:00
- name : check if the red hat storage tools repo is already present
2016-08-12 23:30:41 +08:00
shell : yum --noplugins --cacheonly repolist | grep -sq rhel-7-server-rhceph-{{ ceph_rhcs_version }}-tools-rpms
2015-07-06 23:14:07 +08:00
changed_when : false
2015-07-29 00:21:15 +08:00
failed_when : false
2018-04-12 18:15:35 +08:00
register : rhcs_tools_repo
2017-10-25 22:53:34 +08:00
check_mode : no
2017-09-15 06:48:53 +08:00
when :
2018-05-08 22:11:14 +08:00
- (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)
2015-07-03 00:23:11 +08:00
2018-04-12 18:15:35 +08:00
- name : enable red hat storage tools repository
2016-08-12 23:30:41 +08:00
command : subscription-manager repos --enable rhel-7-server-rhceph-{{ ceph_rhcs_version }}-tools-rpms
2015-07-06 23:03:31 +08:00
changed_when : false
2015-07-06 23:14:07 +08:00
when :
2018-05-08 22:11:14 +08:00
- (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)
2018-04-12 18:15:35 +08:00
- rhcs_tools_repo.rc != 0