Skip to content

Commit

Permalink
Fix bug in f310d13 (v2)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimi-c committed May 3, 2015
1 parent a87d889 commit 6a44056
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions v2/ansible/playbook/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def post_validate(self, templar):
# run the post-validator if present
method = getattr(self, '_post_validate_%s' % name, None)
if method:
value = method(attribute, value, all_vars, fail_on_undefined)
value = method(attribute, value, all_vars, templar._fail_on_undefined_errors)
else:
# otherwise, just make sure the attribute is of the type it should be
if attribute.isa == 'string':
Expand All @@ -281,7 +281,7 @@ def post_validate(self, templar):
except (TypeError, ValueError) as e:
raise AnsibleParserError("the field '%s' has an invalid value (%s), and could not be converted to an %s. Error was: %s" % (name, value, attribute.isa, e), obj=self.get_ds())
except UndefinedError as e:
if fail_on_undefined:
if templar._fail_on_undefined_errors:
raise AnsibleParserError("the field '%s' has an invalid value, which appears to include a variable that is undefined. The error was: %s" % (name,e), obj=self.get_ds())

def serialize(self):
Expand Down

0 comments on commit 6a44056

Please sign in to comment.