Revert "Correctly catch template errors without returning invalid data"

This reverts commit 3cd7d47b7e.
This commit is contained in:
Michael DeHaan 2014-03-13 07:46:08 -04:00
parent e6f6a73328
commit d1753046e0

View file

@ -316,8 +316,6 @@ def template_from_string(basedir, data, vars, fail_on_undefined=False):
except Exception, e:
if 'recursion' in str(e):
raise errors.AnsibleError("recursive loop detected in template string: %s" % data)
elif isinstance(e, TemplateSyntaxError):
raise errors.AnsibleError("there was an error in the template: %s" % data)
else:
return data