mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Instance the Runner class instead of the RunnerClient as we're running on the Master
This commit is contained in:
parent
b72b7c5402
commit
83c73a69cb
1 changed files with 10 additions and 5 deletions
|
@ -40,9 +40,14 @@ def cmd(
|
|||
'result': True}
|
||||
if func is None:
|
||||
func = name
|
||||
client = salt.runner.RunnerClient(__opts__)
|
||||
low = {'fun': func,
|
||||
'arg': arg,
|
||||
'kwarg': kwargs}
|
||||
client.cmd_async(low)
|
||||
local_opts = {}
|
||||
local_opts.update(__opts__)
|
||||
local_opts['async'] = True # ensure this will be run async
|
||||
local_opts.update({
|
||||
'fun': func,
|
||||
'arg': arg,
|
||||
'kwarg': kwargs
|
||||
})
|
||||
runner = salt.runner.Runner(local_opts)
|
||||
runner.run()
|
||||
return ret
|
||||
|
|
Loading…
Add table
Reference in a new issue