Merge pull request #14619 from dagwieers/patch-10

Check for closing sequence before templating
This commit is contained in:
Brian Coca 2016-03-04 13:32:17 -05:00
commit 402e375698

View file

@ -119,7 +119,7 @@ def template(basedir, varname, templatevars, lookup_fatal=True, depth=0, expand_
varname = "{{%s}}" % varname
if isinstance(varname, basestring):
if '{{' in varname or '{%' in varname:
if ('{{' in varname and '}}' in varname ) or ( '{%' in varname and '%}' in varname ):
try:
varname = template_from_string(basedir, varname, templatevars, fail_on_undefined)
except errors.AnsibleError, e: