Is there a way to specify a variable as “required”? E.g. a parameter for a role that must be set?
(Other than inserting a fail task when the variable is not defined.)
David
Is there a way to specify a variable as “required”? E.g. a parameter for a role that must be set?
(Other than inserting a fail task when the variable is not defined.)
David
There isn’t, though this will work just fine:
fail: msg=‘missing required variables’
when: not (foo is defined and bar is defined and baz is defined)