mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Pass the minion_opts through the FunctionWrapper
This commit is contained in:
parent
cb69cd07de
commit
8e3e8e073a
2 changed files with 6 additions and 0 deletions
|
@ -683,6 +683,7 @@ class Single(object):
|
|||
self.opts,
|
||||
self.id,
|
||||
fsclient=self.fsclient,
|
||||
minion_opts=self.minion_opts,
|
||||
**self.target)
|
||||
opts_pkg = pre_wrapper['test.opts_pkg']()
|
||||
opts_pkg['file_roots'] = self.opts['file_roots']
|
||||
|
@ -739,6 +740,7 @@ class Single(object):
|
|||
opts,
|
||||
self.id,
|
||||
fsclient=self.fsclient,
|
||||
minion_opts=self.minion_opts,
|
||||
**self.target)
|
||||
self.wfuncs = salt.loader.ssh_wrapper(opts, wrapper, self.context)
|
||||
wrapper.wfuncs = self.wfuncs
|
||||
|
|
|
@ -29,6 +29,7 @@ class FunctionWrapper(object):
|
|||
mods=None,
|
||||
fsclient=None,
|
||||
cmd_prefix=None,
|
||||
minion_opts=None,
|
||||
**kwargs):
|
||||
super(FunctionWrapper, self).__init__()
|
||||
self.cmd_prefix = cmd_prefix
|
||||
|
@ -39,6 +40,7 @@ class FunctionWrapper(object):
|
|||
'host': host}
|
||||
self.fsclient = fsclient
|
||||
self.kwargs.update(kwargs)
|
||||
self.minion_opts = minion_opts
|
||||
|
||||
def __getitem__(self, cmd):
|
||||
'''
|
||||
|
@ -59,6 +61,7 @@ class FunctionWrapper(object):
|
|||
mods=self.mods,
|
||||
fsclient=self.fsclient,
|
||||
cmd_prefix=cmd,
|
||||
minion_opts=self.minion_opts
|
||||
**kwargs)
|
||||
|
||||
if self.cmd_prefix:
|
||||
|
@ -83,6 +86,7 @@ class FunctionWrapper(object):
|
|||
mods=self.mods,
|
||||
wipe=True,
|
||||
fsclient=self.fsclient,
|
||||
minion_opts = self.minion_opts
|
||||
**self.kwargs
|
||||
)
|
||||
stdout, stderr, _ = single.cmd_block()
|
||||
|
|
Loading…
Add table
Reference in a new issue