diff --git a/lib/ansible/playbook/base.py b/lib/ansible/playbook/base.py index 10f8fe90a49..daaa7c10654 100644 --- a/lib/ansible/playbook/base.py +++ b/lib/ansible/playbook/base.py @@ -427,6 +427,7 @@ class FieldAttributeBase(with_metaclass(BaseMeta, object)): # and assign the massaged value back to the attribute field setattr(self, name, value) except (TypeError, ValueError) as e: + value = getattr(self, name) raise AnsibleParserError("the field '%s' has an invalid value (%s), and could not be converted to an %s." "The error was: %s" % (name, value, attribute.isa, e), obj=self.get_ds(), orig_exc=e) except (AnsibleUndefinedVariable, UndefinedError) as e: