Check for closing sequence for templating (Ansible v1.9)
This fixes #14573 for Ansible v1.9.
This commit is contained in:
parent
a05df837aa
commit
edf3164bc7
1 changed files with 1 additions and 1 deletions
|
@ -119,7 +119,7 @@ def template(basedir, varname, templatevars, lookup_fatal=True, depth=0, expand_
|
||||||
varname = "{{%s}}" % varname
|
varname = "{{%s}}" % varname
|
||||||
|
|
||||||
if isinstance(varname, basestring):
|
if isinstance(varname, basestring):
|
||||||
if '{{' in varname or '{%' in varname:
|
if ('{{' in varname and '}}' in varname ) or ( '{%' in varname and '%}' in varname ):
|
||||||
try:
|
try:
|
||||||
varname = template_from_string(basedir, varname, templatevars, fail_on_undefined)
|
varname = template_from_string(basedir, varname, templatevars, fail_on_undefined)
|
||||||
except errors.AnsibleError, e:
|
except errors.AnsibleError, e:
|
||||||
|
|
Loading…
Reference in a new issue