mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-22 22:11:44 -07:00
Tweak error messages for undefined variables feature.
This commit is contained in:
parent
637983cf31
commit
5a504e3a3b
2 changed files with 3 additions and 2 deletions
|
@ -462,7 +462,7 @@ def template_from_file(basedir, path, vars):
|
|||
try:
|
||||
res = jinja2.utils.concat(t.root_render_func(t.new_context(_jinja2_vars(basedir, vars, t.globals), shared=True)))
|
||||
except jinja2.exceptions.UndefinedError, e:
|
||||
raise errors.AnsibleUndefinedVariable("Undefined variables: %s" % str(e))
|
||||
raise errors.AnsibleUndefinedVariable("One or more undefined variables: %s" % str(e))
|
||||
|
||||
if data.endswith('\n') and not res.endswith('\n'):
|
||||
res = res + '\n'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue