diff --git a/tests/roles/bootstrap-host/tasks/check-requirements.yml b/tests/roles/bootstrap-host/tasks/check-requirements.yml index 5f10aa5b8c..99afb5e388 100644 --- a/tests/roles/bootstrap-host/tasks/check-requirements.yml +++ b/tests/roles/bootstrap-host/tasks/check-requirements.yml @@ -50,6 +50,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) }}"