Skip to content

Commit 4b1d9d5

Browse files
committed
tests: fail if there are not enough disks for testing
1 parent 4dc65f6 commit 4b1d9d5

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

tests/get_unused_disk.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@
99
unused_disks: "{{ unused_disks_return.disks }}"
1010
when: "'Unable to find unused disk' not in unused_disks_return.disks"
1111

12-
- block:
13-
- name: Exit playbook when there's not enough unused disks in the system
14-
debug:
15-
msg: "Unable to find enough unused disks. Exiting playbook."
16-
- meta: end_play
12+
- name: Exit playbook when there's not enough unused disks in the system
13+
fail:
14+
msg: "Unable to find enough unused disks. Exiting playbook."
1715
when: unused_disks is undefined or unused_disks|length < disks_needed|default(1)
1816

1917
- name: Print unused disks

0 commit comments

Comments
 (0)