From: Guillaume Abrioux Date: Fri, 7 Jun 2019 08:50:28 +0000 (+0200) Subject: validate: fail in check_devices at the right task X-Git-Tag: v5.0.0alpha1~286 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=771648304d7d867e053f8b8fe3ce5b36e061f100;p=ceph-ansible.git validate: fail in check_devices at the right task see https://bugzilla.redhat.com/show_bug.cgi?id=1648168#c17 for details. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1648168#c17 Signed-off-by: Guillaume Abrioux --- diff --git a/roles/ceph-validate/tasks/check_devices.yml b/roles/ceph-validate/tasks/check_devices.yml index d819ca74a..8b3286c5e 100644 --- a/roles/ceph-validate/tasks/check_devices.yml +++ b/roles/ceph-validate/tasks/check_devices.yml @@ -2,15 +2,16 @@ - name: devices validation when: devices is defined block: - - name: validate devices is actually a device + - name: get devices information parted: device: "{{ item }}" unit: MiB register: devices_parted + failed_when: False with_items: "{{ devices }}" - name: fail if one of the devices is not a device fail: msg: "{{ item }} is not a block special file!" - when: item.failed + when: item.rc is defined with_items: "{{ devices_parted.results }}"