Merge pull request #5465 from deonbredenhann/false_mandatory_variable

Treat a False mandatory variable as defined.
This commit is contained in:
jctanner 2014-01-14 14:15:52 -08:00
commit 91c5c9da08

View file

@ -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 '''