Add more meaningful/user readable failure
Change-Id: I1651f0703afcc45ba1e514524033932e287dacf5
(cherry picked from commit ba78028a0e
)
This commit is contained in:
parent
5c341a7bad
commit
ae133064d8
|
@ -49,6 +49,16 @@
|
|||
tags:
|
||||
- check-disk-size
|
||||
|
||||
- name: Fail when disk can not be found
|
||||
fail:
|
||||
msg: |
|
||||
Can not find disk {{ bootstrap_host_data_disk_device }}
|
||||
when:
|
||||
- bootstrap_host_data_disk_device != None
|
||||
- ansible_devices.get(bootstrap_host_data_disk_device) == None
|
||||
tags:
|
||||
- check-disk-size
|
||||
|
||||
- name: Set data disk facts
|
||||
set_fact:
|
||||
host_data_disk_sectors: "{{ (ansible_devices[bootstrap_host_data_disk_device]['sectors'] | int) }}"
|
||||
|
|
Loading…
Reference in New Issue