From: Sébastien Han Date: Wed, 18 Jul 2018 15:46:27 +0000 (+0200) Subject: validate: only run osd test on osd node X-Git-Tag: v3.2.0beta2~112 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=7fc13bc9d5ab48fe44613e08ca6965b8a79499ed;p=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 Co-authored-by: Guillaume Abrioux --- diff --git a/roles/ceph-validate/tasks/check_devices.yml b/roles/ceph-validate/tasks/check_devices.yml index 0e0a5c333..d35c1aae6 100644 --- a/roles/ceph-validate/tasks/check_devices.yml +++ b/roles/ceph-validate/tasks/check_devices.yml @@ -10,7 +10,7 @@ fail: msg: "{{ item }} is not a block special file!" when: - - item.rc != 0 + - item.failed with_items: "{{ devices_parted.results }}" - name: validate dedicated_device is/are actually device(s) @@ -18,20 +18,21 @@ device: "{{ item }}" unit: MiB register: dedicated_device_parted - with_items: "{{ dedicated_device }}" + with_items: "{{ dedicated_devices }}" when: - osd_scenario == 'non-collocated' - name: fail if one of the dedicated_device is not a device fail: msg: "{{ item }} is not a block special file!" - when: - - item.rc != 0 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 fail: msg: "dedicated_device lengtth must be identical to devices's length" when: - osd_scenario == 'non-collocated' - - dedicated_device|length != devices|length \ No newline at end of file + - dedicated_devices|length != devices|length \ No newline at end of file diff --git a/roles/ceph-validate/tasks/main.yml b/roles/ceph-validate/tasks/main.yml index 9ab948a31..f733f4edc 100644 --- a/roles/ceph-validate/tasks/main.yml +++ b/roles/ceph-validate/tasks/main.yml @@ -54,4 +54,8 @@ include: check_system.yml - name: include check_devices.yml - include: check_devices.yml \ No newline at end of file + include: check_devices.yml + when: + - osd_group_name in group_names + - not osd_auto_discovery | default(False) + - osd_scenario != "lvm" \ No newline at end of file