Commit c85aac8b by Deon Bredenhann

Treat a False mandatory variable as defined.

parent 4f1f13b1
......@@ -76,9 +76,12 @@ def skipped(*a, **kw):
def mandatory(a):
''' Make a variable mandatory '''
if not a:
try:
a
except NameError:
raise errors.AnsibleFilterError('Mandatory variable not defined.')
return a
else:
return a
def bool(a):
''' return a bool for the arg '''
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment