diff --git a/lib/ansible/utils/template.py b/lib/ansible/utils/template.py index 4158768787e..282d7909574 100644 --- a/lib/ansible/utils/template.py +++ b/lib/ansible/utils/template.py @@ -234,8 +234,7 @@ def template(basedir, varname, vars, lookup_fatal=True, depth=0, expand_lists=Tr if isinstance(varname, basestring): if '{{' in varname or '{%' in varname: - res = template_from_string(basedir, varname, vars) - return res + varname = template_from_string(basedir, varname, vars) m = _varFind(basedir, varname, vars, lookup_fatal, depth, expand_lists) if not m: return varname