mirror of https://github.com/ceph/ceph-ansible.git
validate: only run osd test on osd node
Do not run device validation on every hosts, only on OSD nodes. Signed-off-by: Sébastien Han <seb@redhat.com> Co-authored-by: Guillaume Abrioux <gabrioux@redhat.com>pull/2909/head
parent
774980227a
commit
7fc13bc9d5
|
@ -10,7 +10,7 @@
|
||||||
fail:
|
fail:
|
||||||
msg: "{{ item }} is not a block special file!"
|
msg: "{{ item }} is not a block special file!"
|
||||||
when:
|
when:
|
||||||
- item.rc != 0
|
- item.failed
|
||||||
with_items: "{{ devices_parted.results }}"
|
with_items: "{{ devices_parted.results }}"
|
||||||
|
|
||||||
- name: validate dedicated_device is/are actually device(s)
|
- name: validate dedicated_device is/are actually device(s)
|
||||||
|
@ -18,20 +18,21 @@
|
||||||
device: "{{ item }}"
|
device: "{{ item }}"
|
||||||
unit: MiB
|
unit: MiB
|
||||||
register: dedicated_device_parted
|
register: dedicated_device_parted
|
||||||
with_items: "{{ dedicated_device }}"
|
with_items: "{{ dedicated_devices }}"
|
||||||
when:
|
when:
|
||||||
- osd_scenario == 'non-collocated'
|
- osd_scenario == 'non-collocated'
|
||||||
|
|
||||||
- name: fail if one of the dedicated_device is not a device
|
- name: fail if one of the dedicated_device is not a device
|
||||||
fail:
|
fail:
|
||||||
msg: "{{ item }} is not a block special file!"
|
msg: "{{ item }} is not a block special file!"
|
||||||
when:
|
|
||||||
- item.rc != 0
|
|
||||||
with_items: "{{ dedicated_device_parted.results }}"
|
with_items: "{{ dedicated_device_parted.results }}"
|
||||||
|
when:
|
||||||
|
- osd_scenario == 'non-collocated'
|
||||||
|
- item.failed
|
||||||
|
|
||||||
- name: fail if dedicated_device is not the size length as devices
|
- name: fail if dedicated_device is not the size length as devices
|
||||||
fail:
|
fail:
|
||||||
msg: "dedicated_device lengtth must be identical to devices's length"
|
msg: "dedicated_device lengtth must be identical to devices's length"
|
||||||
when:
|
when:
|
||||||
- osd_scenario == 'non-collocated'
|
- osd_scenario == 'non-collocated'
|
||||||
- dedicated_device|length != devices|length
|
- dedicated_devices|length != devices|length
|
|
@ -55,3 +55,7 @@
|
||||||
|
|
||||||
- name: include check_devices.yml
|
- name: include check_devices.yml
|
||||||
include: check_devices.yml
|
include: check_devices.yml
|
||||||
|
when:
|
||||||
|
- osd_group_name in group_names
|
||||||
|
- not osd_auto_discovery | default(False)
|
||||||
|
- osd_scenario != "lvm"
|
Loading…
Reference in New Issue