From 03f39e907f5b586cd6c374f8a2ea568eb9fae8ab Mon Sep 17 00:00:00 2001 From: Gregory Mulvaney Date: Fri, 8 Dec 2023 17:45:40 -0600 Subject: [PATCH] [bootstrap] fix: Fixed required variable validation assertions (#1077) * Fixed required variable validation * Fixed fix --- bootstrap/tasks/validation/vars.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bootstrap/tasks/validation/vars.yaml b/bootstrap/tasks/validation/vars.yaml index 4e65336d..9fcfcf45 100644 --- a/bootstrap/tasks/validation/vars.yaml +++ b/bootstrap/tasks/validation/vars.yaml @@ -1,8 +1,9 @@ --- - - name: Verify required bootstrap vars are set ansible.builtin.assert: - that: item | default('', true) | trim != '' + that: + - item in vars + - vars[item] != None success_msg: Required bootstrap var {{ item }} exists and is defined fail_msg: Required bootstrap var {{ item }} does not exists or is not defined loop: