mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 11:51:26 -07:00
[PR #9339/6e84c137 backport][stable-9] t*: normalize docs (#9355)
t*: normalize docs (#9339)
* t*: normalize docs
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* break long line to regain sanity
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 6e84c1375e
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
8031011497
commit
e120c64a21
6 changed files with 109 additions and 134 deletions
|
@ -9,22 +9,21 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = '''
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: telegram
|
||||
author:
|
||||
- "Artem Feofanov (@tyouxa)"
|
||||
- "Nikolai Lomov (@lomserman)"
|
||||
- "Artem Feofanov (@tyouxa)"
|
||||
- "Nikolai Lomov (@lomserman)"
|
||||
|
||||
short_description: Send notifications via telegram
|
||||
|
||||
description:
|
||||
- Send notifications via telegram bot, to a verified group or user.
|
||||
- Also, the user may try to use any other telegram bot API method, if you specify O(api_method) argument.
|
||||
- Send notifications via telegram bot, to a verified group or user.
|
||||
- Also, the user may try to use any other telegram bot API method, if you specify O(api_method) argument.
|
||||
notes:
|
||||
- You will require a telegram account and create telegram bot to use this module.
|
||||
- You will require a telegram account and create telegram bot to use this module.
|
||||
extends_documentation_fragment:
|
||||
- community.general.attributes
|
||||
- community.general.attributes
|
||||
attributes:
|
||||
check_mode:
|
||||
support: full
|
||||
|
@ -49,11 +48,9 @@ options:
|
|||
- Any parameters for the method.
|
||||
- For reference to default method, V(SendMessage), see U(https://core.telegram.org/bots/api#sendmessage).
|
||||
version_added: 2.0.0
|
||||
"""
|
||||
|
||||
'''
|
||||
|
||||
EXAMPLES = """
|
||||
|
||||
EXAMPLES = r"""
|
||||
- name: Send notify to Telegram
|
||||
community.general.telegram:
|
||||
token: '9999999:XXXXXXXXXXXXXXXXXXXXXXX'
|
||||
|
@ -75,15 +72,14 @@ EXAMPLES = """
|
|||
message_id: '{{ saved_msg_id }}'
|
||||
"""
|
||||
|
||||
RETURN = """
|
||||
|
||||
RETURN = r"""
|
||||
msg:
|
||||
description: The message you attempted to send
|
||||
description: The message you attempted to send.
|
||||
returned: success
|
||||
type: str
|
||||
sample: "Ansible task finished"
|
||||
telegram_error:
|
||||
description: Error message gotten from Telegram API
|
||||
description: Error message gotten from Telegram API.
|
||||
returned: failure
|
||||
type: str
|
||||
sample: "Bad Request: message text is empty"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue