Merge pull request #41985 from rallytime/bp-41780

Back-port #41780 to 2016.11
This commit is contained in:
Nicole Thomas 2017-06-28 14:18:56 -06:00 committed by GitHub
commit 768339d734

View file

@ -305,14 +305,7 @@ def render_jinja_tmpl(tmplstr, context, tmplpath=None):
if not saltenv:
if tmplpath:
# i.e., the template is from a file outside the state tree
#
# XXX: FileSystemLoader is not being properly instantiated here is
# it? At least it ain't according to:
#
# http://jinja.pocoo.org/docs/api/#jinja2.FileSystemLoader
loader = jinja2.FileSystemLoader(
context, os.path.dirname(tmplpath))
loader = jinja2.FileSystemLoader(os.path.dirname(tmplpath))
else:
loader = salt.utils.jinja.SaltCacheLoader(opts, saltenv, pillar_rend=context.get('_pillar_rend', False))