File tree Expand file tree Collapse file tree 2 files changed +5
-13
lines changed
Expand file tree Collapse file tree 2 files changed +5
-13
lines changed Original file line number Diff line number Diff line change 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 no unused disks in the system
14- debug :
15- msg : " Unable to find unused disks. Exiting playbook."
16- - meta : end_play
17- when : unused_disks is undefined
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."
15+ when : unused_disks is undefined or unused_disks|length < disks_needed|default(1)
1816
1917- name : Print unused disks
2018 debug :
Original file line number Diff line number Diff line change 1515 vars :
1616 min_size : " {{ volume_group_size }}"
1717 max_return : 2
18-
19- - block :
20- - debug :
21- msg : " There needs to be two unused disks in the system to run this playbook."
22- - name : End playbook if there isn't two disks available
23- meta : end_play
24- when : unused_disks|length < 2
18+ disks_needed : 2
2519
2620 - name : Create a logical volume spanning two physical volumes that changes its mount location
2721 include_role :
You can’t perform that action at this time.
0 commit comments