Skip to content

Commit

Permalink
Fix grains and pillars in salt-ssh
Browse files Browse the repository at this point in the history
Due to changes in saltstack#23373, we need to explicitely pass in the grains
and pillar we have generated.
  • Loading branch information
Mike Place committed Mar 17, 2016
1 parent fb6d5fa commit a63bb85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion salt/client/ssh/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,7 @@ def run_wfunc(self):
if not data_cache:
refresh = True
if refresh:
print('Refreshing')
# Make the datap
# TODO: Auto expire the datap
pre_wrapper = salt.client.ssh.wrapper.FunctionWrapper(
Expand Down Expand Up @@ -901,7 +902,7 @@ def run_wfunc(self):
fsclient=self.fsclient,
minion_opts=self.minion_opts,
**self.target)
self.wfuncs = salt.loader.ssh_wrapper(opts, wrapper, self.context)
self.wfuncs = salt.loader.ssh_wrapper(opts, wrapper, self.context, grains=opts['grains'], pillar=opts['pillar'])
wrapper.wfuncs = self.wfuncs

# We're running in the mind, need to fetch the arguments from the
Expand Down
4 changes: 2 additions & 2 deletions salt/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ def log_handlers(opts, functions=None, grains=None):
return FilterDictWrapper(ret, '.setup_handlers')


def ssh_wrapper(opts, functions=None, context=None):
def ssh_wrapper(opts, functions=None, context=None, grains=None, pillar=None):
'''
Returns the custom logging handler modules
'''
Expand All @@ -551,7 +551,7 @@ def ssh_wrapper(opts, functions=None, context=None):
),
opts,
tag='wrapper',
pack={'__salt__': functions, '__context__': context},
pack={'__salt__': functions, '__context__': context, '__grains__': grains, '__pillar__': pillar},
)


Expand Down

0 comments on commit a63bb85

Please sign in to comment.