Last active
August 29, 2015 14:15
-
-
Save paha/03c967d82365da731dfa to your computer and use it in GitHub Desktop.
Passing arguments to salt runner
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
from reactor: | |
start_container: | |
runner.lxc.init: | |
- host: salt-master | |
- arg: | |
- lxc-test | |
- kwarg: | |
template: ubuntu | |
start: true | |
[DEBUG ] ThreadPool executing func: <bound method RunnerClient.low of <salt.runner.Run | |
nerClient object at 0x7ffdfcb30a50>> with args:('lxc.init', {'name': 'start_container', 'state': 'r | |
unner', 'host': 'salt-master', 'kwarg': OrderedDict([('template', 'ubuntu'), ('start', T | |
rue)]), '__id__': 'start_container', 'arg': ['lxc-test'], 'order': 1}) kwargs{} | |
[DEBUG ] init takes at least 1 argument (0 given) | |
Another variation: | |
start_container: | |
runner.lxc.init: | |
- host: salt-master | |
- lxc-test | |
- kwarg: | |
template: ubuntu | |
start: true | |
[DEBUG ] Results of YAML rendering: | |
OrderedDict([('start_container', OrderedDict([('runner.lxc.init', [OrderedDict([('host', 'salt-master')]), 'lxc-test', OrderedDict([('kwarg', OrderedDict([('template', 'ubuntu'), ('start', True)]))])])]))]) | |
Process Reactor-4: | |
Traceback (most recent call last): | |
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap | |
self.run() | |
File "/usr/lib/python2.7/dist-packages/salt/utils/event.py", line 691, in run | |
chunks = self.reactions(data['tag'], data['data'], reactors) | |
File "/usr/lib/python2.7/dist-packages/salt/utils/event.py", line 662, in reactions | |
errors = self.verify_high(high) | |
File "/usr/lib/python2.7/dist-packages/salt/state.py", line 424, in verify_high | |
'SLS {1!r}'.format(state, body['__sls__']) | |
KeyError: '__sls__' | |
[INFO ] Process <class 'salt.utils.event.Reactor'> (2865) died with exit status None, restarting... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment