Fixed required variable validation (#1074)
This commit is contained in:
1 parent
5d538a0433
commit
3289bb28b0
1 file changed
+4
-3
@@ -1,8 +1,9 @@
|
||||
---
|
||||
|
||||
- name: Verify required bootstrap vars are set
|
||||
ansible.builtin.assert:
|
||||
that: item | default('', true) | trim != ''
|
||||
that:
|
||||
- vars[item] is defined
|
||||
- vars[item] | default('', true) | trim != ''
|
||||
success_msg: Required bootstrap var {{ item }} exists and is defined
|
||||
fail_msg: Required bootstrap var {{ item }} does not exists or is not defined
|
||||
loop:
|
||||
@@ -34,4 +35,4 @@
|
||||
fail_msg: Node name {{ item.name }} is not valid
|
||||
loop: "{{ bootstrap_nodes.master + bootstrap_nodes.worker | default([]) }}"
|
||||
loop_control:
|
||||
label: "{{ item.name }}"
|
||||
label: "{{ item.name }}"
|
||||
Reference in new issue
Block a user