mirror of https://github.com/ceph/ceph-ansible.git
ceph-common: use yum install of shell
Use yum module to list repos and then activate them if needed. Signed-off-by: Sébastien Han <seb@redhat.com>pull/3285/head
parent
53cdddf886
commit
adaa914d8e
|
@ -1,10 +1,9 @@
|
||||||
---
|
---
|
||||||
- name: check if the red hat storage monitor repo is already present
|
- name: check if the red hat storage monitor repo is already present
|
||||||
shell: yum --noplugins --cacheonly repolist | grep -sq rhel-7-server-rhceph-{{ ceph_rhcs_version }}-mon-rpms
|
yum:
|
||||||
changed_when: false
|
list: repos
|
||||||
failed_when: false
|
update_cache: no
|
||||||
register: rhcs_mon_repo
|
register: rhcs_mon_repo
|
||||||
check_mode: no
|
|
||||||
when:
|
when:
|
||||||
- (mon_group_name in group_names or mgr_group_name in group_names)
|
- (mon_group_name in group_names or mgr_group_name in group_names)
|
||||||
|
|
||||||
|
@ -13,12 +12,12 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when:
|
when:
|
||||||
- (mon_group_name in group_names or mgr_group_name in group_names)
|
- (mon_group_name in group_names or mgr_group_name in group_names)
|
||||||
- rhcs_mon_repo.rc != 0
|
- "'rhel-7-server-rhceph-'+ ceph_rhcs_version | string +'-mon-rpms' not in rhcs_mon_repo.results"
|
||||||
|
|
||||||
- name: check if the red hat storage osd repo is already present
|
- name: check if the red hat storage osd repo is already present
|
||||||
shell: yum --noplugins --cacheonly repolist | grep -sq rhel-7-server-rhceph-{{ ceph_rhcs_version }}-osd-rpms
|
yum:
|
||||||
changed_when: false
|
list: repos
|
||||||
failed_when: false
|
update_cache: no
|
||||||
register: rhcs_osd_repo
|
register: rhcs_osd_repo
|
||||||
check_mode: no
|
check_mode: no
|
||||||
when:
|
when:
|
||||||
|
@ -29,12 +28,12 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when:
|
when:
|
||||||
- osd_group_name in group_names
|
- osd_group_name in group_names
|
||||||
- rhcs_osd_repo.rc != 0
|
- "'rhel-7-server-rhceph-'+ ceph_rhcs_version | string +'-osd-rpms' not in rhcs_osd_repo.results"
|
||||||
|
|
||||||
- name: check if the red hat storage tools repo is already present
|
- name: check if the red hat storage tools repo is already present
|
||||||
shell: yum --noplugins --cacheonly repolist | grep -sq rhel-7-server-rhceph-{{ ceph_rhcs_version }}-tools-rpms
|
yum:
|
||||||
changed_when: false
|
list: repos
|
||||||
failed_when: false
|
update_cache: no
|
||||||
register: rhcs_tools_repo
|
register: rhcs_tools_repo
|
||||||
check_mode: no
|
check_mode: no
|
||||||
when:
|
when:
|
||||||
|
@ -45,4 +44,4 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when:
|
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)
|
- (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)
|
||||||
- rhcs_tools_repo.rc != 0
|
- "'rhel-7-server-rhceph-'+ ceph_rhcs_version | string +'-tools-rpms' not in rhcs_tools_repo.results"
|
Loading…
Reference in New Issue