[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:
patchback[bot] 2024-12-24 14:05:39 +01:00 committed by GitHub
parent 8031011497
commit e120c64a21
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 109 additions and 134 deletions

View file

@ -9,20 +9,17 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
---
DOCUMENTATION = r"""
module: twilio
short_description: Sends a text message to a mobile phone through Twilio
description:
- Sends a text message to a phone number through the Twilio messaging API.
- Sends a text message to a phone number through the Twilio messaging API.
notes:
- This module is non-idempotent because it sends an email through the
external API. It is idempotent only in the case that the module fails.
- Like the other notification modules, this one requires an external
dependency to work. In this case, you'll need a Twilio account with
a purchased or verified phone number to send the text message.
- This module is non-idempotent because it sends an email through the external API. It is idempotent only in the case that the module fails.
- Like the other notification modules, this one requires an external dependency to work. In this case, you'll need a Twilio account with a purchased
or verified phone number to send the text message.
extends_documentation_fragment:
- community.general.attributes
- community.general.attributes
attributes:
check_mode:
support: full
@ -50,7 +47,7 @@ options:
description:
- One or more phone numbers to send the text message to, format C(+15551112222).
required: true
aliases: [ to_number ]
aliases: [to_number]
from_number:
type: str
description:
@ -59,14 +56,13 @@ options:
media_url:
type: str
description:
- A URL with a picture, video or sound clip to send with an MMS
(multimedia message) instead of a plain SMS.
- A URL with a picture, video or sound clip to send with an MMS (multimedia message) instead of a plain SMS.
required: false
author: "Matt Makai (@makaimc)"
'''
"""
EXAMPLES = '''
EXAMPLES = r"""
# send an SMS about the build status to (555) 303 5681
# note: replace account_sid and auth_token values with your credentials
# and you have to have the 'from_number' on your Twilio account
@ -75,8 +71,8 @@ EXAMPLES = '''
msg: All servers with webserver role are now configured.
account_sid: ACXXXXXXXXXXXXXXXXX
auth_token: ACXXXXXXXXXXXXXXXXX
from_number: +15552014545
to_number: +15553035681
from_number: "+15552014545"
to_number: "+15553035681"
delegate_to: localhost
# send an SMS to multiple phone numbers about the deployment
@ -87,11 +83,11 @@ EXAMPLES = '''
msg: This server configuration is now complete.
account_sid: ACXXXXXXXXXXXXXXXXX
auth_token: ACXXXXXXXXXXXXXXXXX
from_number: +15553258899
from_number: "+15553258899"
to_numbers:
- +15551113232
- +12025551235
- +19735559010
- "+15551113232"
- "+12025551235"
- "+19735559010"
delegate_to: localhost
# send an MMS to a single recipient with an update on the deployment
@ -103,11 +99,11 @@ EXAMPLES = '''
msg: Deployment complete!
account_sid: ACXXXXXXXXXXXXXXXXX
auth_token: ACXXXXXXXXXXXXXXXXX
from_number: +15552014545
to_number: +15553035681
from_number: "+15552014545"
to_number: "+15553035681"
media_url: https://demo.twilio.com/logo.png
delegate_to: localhost
'''
"""
# =======================================
# twilio module support methods