-
-
Save Karunamon/2d02fe7c1c0596c5e400d12af64403e4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
start_random_vm: | |
module.run: | |
- name: cloud.action | |
- kwargs: | |
action: 'stop' | |
instance: 'somevm' |
That blows up too - it doesn't appear to recognize the action as an action.
local:
----------
ID: start_random_vm
Function: module.run
Name: cloud.action
Result: True
Comment: Module function cloud.action executed
Started: 11:19:37.622324
Duration: 33991.754 ms
Changes:
----------
ret:
----------
Invalid Actions:
----------
vmware.None:
- somevm
Not Actioned/Not Running:
- somevm
Not Found:
- somevm
for cloud.action the function is fun: not action:
Sorry, I didn't look closely enough at the cloud.action signature. Looks like it wants fun
instead of action
.
I was looking at the runner doc rather than the module doc - however, identical error for fun
:
start_random_vm:
module.run:
- name: cloud.action
- fun: 'start'
- instance: 'somevm'
The signature is:
salt.modules.cloud.action(fun=None, cloudmap=None, names=None, provider=None, instance=None, **kwargs)
Using the runner module from the CLI works as expected: salt-run cloud.action stop instance=somevm
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Close! The
**kwargs
in that function signature want the keyword args to be top-level. The docs should really show an example. Try this: