Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- running salt-master -l debug, and calling, invokes:
- [DEBUG ] Gathering reactors for tag salt/netapi/hook/ping
- [DEBUG ] Compiling reactions for tag salt/netapi/hook/ping
- [DEBUG ] Jinja search path: ['/var/cache/salt/master/files/base']
- [DEBUG ] Rendered data from file: /srv/salt/netapi/ping.sls:
- #
- pingtest:
- cmd.cmd.script:
- - tgt: base-lj-3
- - fun cmd.run
- - arg salt://srv/salt/netapi/test.sh
- - kwarg:
- user: root
- group: root
- #
- [DEBUG ] Results of YAML rendering:
- OrderedDict([('pingtest', OrderedDict([('cmd.cmd.script', [OrderedDict([('tgt', 'base-lj-3')]), 'fun cmd.run', 'arg salt://srv/salt/netapi/test.sh', OrderedDict([('kwarg', OrderedDict([('user', 'root'), ('group', 'root')]))])])]))])
- Process Reactor-4:
- Traceback (most recent call last):
- File "/usr/lib64/python2.6/multiprocessing/process.py", line 232, in _bootstrap
- self.run()
- File "/usr/lib/python2.6/site-packages/salt/utils/event.py", line 593, in run
- chunks = self.reactions(data['tag'], data['data'], reactors)
- File "/usr/lib/python2.6/site-packages/salt/utils/event.py", line 571, in reactions
- errors = self.verify_high(high)
- File "/usr/lib/python2.6/site-packages/salt/state.py", line 315, in verify_high
- body['__sls__']))
- KeyError: '__sls__'
- When I try the other version
- {% set postdata = data.get('post', {}) %}
- #{% if postdata.secretkey == "jenkins2salt" %}
- pingtest:
- cmd.cmd.script:
- - tgt: base-lj-3
- - fun test.ping
- - kwarg:
- user: root
- group: root
- #{% endif %}
- I get nothing.
- So what I now have for ping.sls:
- {% set postdata = data.get('post', {}) %}
- {% if data.post.secretkey == "<secret>" %}
- pingtest:
- cmd.cmd.script:
- - tgt: base-lj-3
- - fun test.ping
- - kwarg:
- user: root
- group: root
- {% endif %}
- This produces a "success=true" but no output.
- I also tried:
- {% set postdata = data.get('post', {}) %}
- {% if data.post.secretkey == "<secret>" %}
- pingtest:
- cmd.cmd.script:
- - tgt: base-lj-3
- - fun cmd.run
- - arg salt://srv/salt/netapi/test.sh
- - kwarg:
- user: root
- group: root
- {% endif %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement