mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Merge pull request #44781 from cloudflare/thorium-fix-41869
Correct the thorium runner
This commit is contained in:
commit
8ed6287762
@ -10,7 +10,7 @@ import salt.runner
|
||||
|
||||
def cmd(
|
||||
name,
|
||||
fun=None,
|
||||
func=None,
|
||||
arg=(),
|
||||
**kwargs):
|
||||
'''
|
||||
@ -22,14 +22,14 @@ def cmd(
|
||||
|
||||
run_cloud:
|
||||
runner.cmd:
|
||||
- fun: cloud.create
|
||||
- func: cloud.create
|
||||
- arg:
|
||||
- my-ec2-config
|
||||
- myinstance
|
||||
|
||||
run_cloud:
|
||||
runner.cmd:
|
||||
- fun: cloud.create
|
||||
- func: cloud.create
|
||||
- kwargs:
|
||||
provider: my-ec2-config
|
||||
instances: myinstance
|
||||
@ -38,11 +38,16 @@ def cmd(
|
||||
'changes': {},
|
||||
'comment': '',
|
||||
'result': True}
|
||||
if fun is None:
|
||||
fun = name
|
||||
client = salt.runner.RunnerClient(__opts__)
|
||||
low = {'fun': fun,
|
||||
'arg': arg,
|
||||
'kwargs': kwargs}
|
||||
client.cmd_async(low)
|
||||
if func is None:
|
||||
func = name
|
||||
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…
Reference in New Issue
Block a user