]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
validate: fail in check_devices at the right task
authorGuillaume Abrioux <gabrioux@redhat.com>
Fri, 7 Jun 2019 08:50:28 +0000 (10:50 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Fri, 7 Jun 2019 14:14:18 +0000 (16:14 +0200)
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 <gabrioux@redhat.com>
roles/ceph-validate/tasks/check_devices.yml

index d819ca74ac2256fcdbf356bbfe7e0b97f3d663f2..8b3286c5ea4b37da28ac1fe02b08184775263ec2 100644 (file)
@@ -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 }}"