Add documentation for the Telegram bot

This commit is contained in:
Rafael Caricio 2016-12-19 00:44:50 +01:00
parent aa171a5468
commit 88589fb1f6
3 changed files with 11 additions and 4 deletions

View file

@ -32,5 +32,6 @@ beacon modules
service
sh
status
telegram_bot_msg
twilio_txt_msg
wtmp

View file

@ -0,0 +1,6 @@
=============================
salt.beacons.telegram_bot_msg
=============================
.. automodule:: salt.beacons.telegram_bot_msg
:members:

View file

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
'''
Beacon to emit Telegram messages of a bot
Beacon to emit Telegram messages
'''
# Import Python libs
@ -50,8 +50,8 @@ def __validate__(config):
def beacon(config):
'''
Emit a dict name "msgs" whose value is a list of messages sent to
the configured bot by the listed users.
Emit a dict with a key "msgs" whose value is a list of messages
sent to the configured bot by one of the allowed usernames.
.. code-block:: yaml
@ -59,7 +59,7 @@ def beacon(config):
telegram_bot_msg:
token: "<bot access token>"
accept_from:
- <valid username>
- "<valid username>"
interval: 10
'''