Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ping.sls:
- {#
- This variable will be buried inside the {{ data }} dictionary. So I expect the following conditional will render to an empty string. Also it's 'post' not 'postdata'. Try {% if data.post.secretkey ... %} instead.
- #}
- {% if postdata.secretkey == "<secret>" %}
- {#
- The sls data structure in Reactor files is different than regular sls files because it's being run on the master and in a different context. Try this instead:
- pingtest:
- cmd.cmd.script:
- - tgt: <sometarget>
- - kwarg:
- user: root
- group: root
- #}
- pingtest:
- cmd:
- - script
- - name: salt://netapi/test.sh
- - user: root
- - group: root
- {% endif %}
- pingscript.sls
- pingtest:
- cmd:
- - script
- - name: salt://netapi/test.sh
- - user: root
- - group: root
- Invocation:
- curl -H "Accept: application/json" -d tgt='base-lj-3' -d secretkey="<secret>" -k https://<ip>:8888/hook/ping
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement