mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-22 22:11:44 -07:00
Fixing traceback caused by incorrect argument passing to json.dumps
Fixes #5756
This commit is contained in:
parent
79cefa1af5
commit
3fddd78ec5
2 changed files with 9 additions and 3 deletions
|
@ -547,6 +547,8 @@ def template_from_string(basedir, data, vars, fail_on_undefined=False):
|
|||
except TypeError, te:
|
||||
if 'StrictUndefined' in str(te):
|
||||
raise errors.AnsibleUndefinedVariable("unable to look up a name or access an attribute in template string")
|
||||
else:
|
||||
raise errors.AnsibleError("an unexpected type error occured. Error was %s" % te)
|
||||
return res
|
||||
except (jinja2.exceptions.UndefinedError, errors.AnsibleUndefinedVariable):
|
||||
if fail_on_undefined:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue