mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Better fix
Just use opts grains int he loader and fall back to empty dict
This commit is contained in:
parent
4e18ff7000
commit
7b50e1766e
@ -565,7 +565,8 @@ def render(opts, functions, states=None):
|
||||
'''
|
||||
Returns the render modules
|
||||
'''
|
||||
pack = {'__salt__': functions}
|
||||
pack = {'__salt__': functions,
|
||||
'__grains__': opts.get('grains', {})}
|
||||
if states:
|
||||
pack['__states__'] = states
|
||||
ret = LazyLoader(
|
||||
|
@ -367,11 +367,10 @@ def render(template_file, saltenv='base', sls='', argline='',
|
||||
raise SaltRenderError(
|
||||
'Unknown renderer option: {opt}'.format(opt=argline)
|
||||
)
|
||||
|
||||
tmp_data = salt.utils.templates.JINJA(template_file,
|
||||
to_str=True,
|
||||
salt=_split_module_dicts(),
|
||||
grains=__opts__['grains'],
|
||||
grains=__grains__,
|
||||
opts=__opts__,
|
||||
pillar=__pillar__,
|
||||
saltenv=saltenv,
|
||||
|
Loading…
Reference in New Issue
Block a user