%PDF- %PDF-
| Direktori : /proc/self/root/proc/3522530/root/usr/lib/python2.7/site-packages/salt/engines/ |
| Current File : //proc/self/root/proc/3522530/root/usr/lib/python2.7/site-packages/salt/engines/webhook.pyo |
�
���^c @@ sk d Z d d l m Z m Z m Z d d l Z d d l Z d d l Z d d l Z
d d d d d � Z d S( u
Send events from webhook api
i ( t absolute_importt print_functiont unicode_literalsNi� c @ s t j d � d k r7 t j j j t t d � j � n d
� � f d � � d t j j
f � f d � � Y} t j j d | f g � } d
} t | | g � r� i | d 6| d 6} n t j
j d
t � } | j � t j j | d | �} | j | d | �| j � d
S( u
Api to listen for webhooks to send to the reactor.
Implement the webhook behavior in an engine.
:py:class:`rest_cherrypy Webhook docs <salt.netapi.rest_cherrypy.app.Webhook>`
Unlike the rest_cherrypy Webhook, this is only an unauthenticated webhook
endpoint. If an authenticated webhook endpoint is needed, use the salt-api
webhook which runs on the master and authenticates through eauth.
.. note: This is really meant to be used on the minion, because salt-api
needs to be run on the master for use with eauth.
.. warning:: Unauthenticated endpoint
This engine sends webhook calls to the event stream. If the engine is
running on a minion with `file_client: local` the event is sent to the
minion event stream. Otherwise it is sent to the master event stream.
Example Config
.. code-block:: yaml
engines:
- webhook: {}
.. code-block:: yaml
engines:
- webhook:
port: 8000
address: 10.128.1.145
ssl_crt: /etc/pki/tls/certs/localhost.crt
ssl_key: /etc/pki/tls/certs/localhost.key
.. note: For making an unsigned key, use the following command
`salt-call --local tls.create_self_signed_cert`
u __roleu masteru sock_dirc @ s+ � r � | | � n t d | | � d S( u'