Instance the Runner class instead of the RunnerClient as we're running on the Master

This commit is contained in:
Mircea Ulinic 2017-12-01 15:50:07 +00:00
parent b72b7c5402
commit 83c73a69cb
No known key found for this signature in database
GPG key ID: 4286FAD4BACBB073

View file

@ -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