Make sure task names are templated before callbacks are sent

This commit is contained in:
James Cammarata 2015-06-18 14:27:20 -04:00
parent 98fee172ee
commit c0dfa8d512
2 changed files with 6 additions and 2 deletions

View file

@ -281,7 +281,7 @@ class Base:
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 templar._fail_on_undefined_errors:
if templar._fail_on_undefined_errors and name != 'name':
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):