1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-04-11 06:25:04 +00:00

modules: fix examples to use FQCN (#644)

* modules: fix examples to use FQCN

* fix

* fix

* fix
This commit is contained in:
Andrew Klychkov 2020-07-13 22:50:31 +03:00 committed by GitHub
parent 8b92e0454d
commit 41cfdda6a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
533 changed files with 2130 additions and 2130 deletions

View file

@ -53,14 +53,14 @@ author: "Adam Garside (@fabulops)"
EXAMPLES = '''
- name: Send a message to Campfire
campfire:
community.general.campfire:
subscription: foo
token: 12345
room: 123
msg: Task completed.
- name: Send a message to Campfire
campfire:
community.general.campfire:
subscription: foo
token: 12345
room: 123

View file

@ -54,7 +54,7 @@ notes:
EXAMPLES = '''
- name: Send a mms to multiple users
catapult:
community.general.catapult:
src: "+15035555555"
dest:
- "+12525089000"
@ -66,7 +66,7 @@ EXAMPLES = '''
api_secret: "{{ api_secret }}"
- name: Send a sms to a single user
catapult:
community.general.catapult:
src: "+15035555555"
dest: "+12018994225"
msg: "Consider yourself notified"

View file

@ -78,7 +78,7 @@ requirements: [ ]
EXAMPLES = '''
- name: Send a message to a flowdock
flowdock:
community.general.flowdock:
type: inbox
token: AAAAAA
from_address: user@example.com
@ -87,7 +87,7 @@ EXAMPLES = '''
subject: test subject
- name: Send a message to a flowdock
flowdock:
community.general.flowdock:
type: chat
token: AAAAAA
external_user_name: testuser

View file

@ -48,7 +48,7 @@ author: "Jonas Pfenniger (@zimbatm)"
EXAMPLES = '''
- name: Sends a notification to a grove.io channel
grove:
community.general.grove:
channel_token: 6Ph62VBBJOccmtTPZbubiPzdrhipZXtg
service: my-app
message: 'deployed {{ target }}'

View file

@ -66,12 +66,12 @@ author:
EXAMPLES = '''
- name: Send a message to a Hipchat room
hipchat:
community.general.hipchat:
room: notif
msg: Ansible task finished
- name: Send a message to a Hipchat room using Hipchat API version 2
hipchat:
community.general.hipchat:
api: https://api.hipchat.com/v2/
token: OAUTH2_TOKEN
room: notify

View file

@ -84,7 +84,7 @@ author:
EXAMPLES = '''
- name: Send a message to an IRC channel from nick ansible
irc:
community.general.irc:
server: irc.example.net
channel: #t1
msg: Hello world

View file

@ -50,21 +50,21 @@ author: "Brian Coca (@bcoca)"
EXAMPLES = '''
- name: Send a message to a user
jabber:
community.general.jabber:
user: mybot@example.net
password: secret
to: friend@example.net
msg: Ansible task finished
- name: Send a message to a room
jabber:
community.general.jabber:
user: mybot@example.net
password: secret
to: mychaps@conference.example.net/ansiblebot
msg: Ansible task finished
- name: Send a message, specifying the host and port
jabber:
community.general.jabber:
user: mybot@example.net
host: talk.example.net
port: 5223

View file

@ -40,7 +40,7 @@ RETURN = '''# '''
EXAMPLES = '''
- name: Send a message to logentries
logentries_msg:
community.general.logentries_msg:
token=00000000-0000-0000-0000-000000000000
msg="{{ ansible_hostname }}"
'''

View file

@ -123,12 +123,12 @@ options:
EXAMPLES = r'''
- name: Example playbook sending mail to root
mail:
community.general.mail:
subject: System {{ ansible_hostname }} has been successfully provisioned.
delegate_to: localhost
- name: Sending an e-mail using Gmail SMTP servers
mail:
community.general.mail:
host: smtp.gmail.com
port: 587
username: username@gmail.com
@ -139,7 +139,7 @@ EXAMPLES = r'''
delegate_to: localhost
- name: Send e-mail to a bunch of users, attaching files
mail:
community.general.mail:
host: 127.0.0.1
port: 2025
subject: Ansible-report
@ -159,7 +159,7 @@ EXAMPLES = r'''
delegate_to: localhost
- name: Sending an e-mail using the remote machine, not the Ansible controller node
mail:
community.general.mail:
host: localhost
port: 25
to: John Smith <john.smith@example.com>
@ -167,7 +167,7 @@ EXAMPLES = r'''
body: System {{ ansible_hostname }} has been successfully provisioned.
- name: Sending an e-mail using Legacy SSL to the remote machine
mail:
community.general.mail:
host: localhost
port: 25
to: John Smith <john.smith@example.com>
@ -176,7 +176,7 @@ EXAMPLES = r'''
secure: always
- name: Sending an e-mail using StartTLS to the remote machine
mail:
community.general.mail:
host: localhost
port: 25
to: John Smith <john.smith@example.com>
@ -360,7 +360,7 @@ def main():
part.add_header('Content-disposition', 'attachment', filename=os.path.basename(filename))
msg.attach(part)
except Exception as e:
module.fail_json(rc=1, msg="Failed to send mail: can't attach file %s: %s" %
module.fail_json(rc=1, msg="Failed to send community.general.mail: can't attach file %s: %s" %
(filename, to_native(e)), exception=traceback.format_exc())
composed = msg.as_string()

View file

@ -46,7 +46,7 @@ requirements:
EXAMPLES = '''
- name: Send matrix notification with token
matrix:
community.general.matrix:
msg_plain: "**hello world**"
msg_html: "<b>hello world</b>"
room_id: "!12345678:server.tld"
@ -54,7 +54,7 @@ EXAMPLES = '''
token: "{{ matrix_auth_token }}"
- name: Send matrix notification with user_id and password
matrix:
community.general.matrix:
msg_plain: "**hello world**"
msg_html: "<b>hello world</b>"
room_id: "!12345678:server.tld"

View file

@ -57,13 +57,13 @@ options:
EXAMPLES = """
- name: Send notification message via Mattermost
mattermost:
community.general.mattermost:
url: http://mattermost.example.com
api_key: my_api_key
text: '{{ inventory_hostname }} completed'
- name: Send notification message via Mattermost all options
mattermost:
community.general.mattermost:
url: http://mattermost.example.com
api_key: my_api_key
text: '{{ inventory_hostname }} completed'

View file

@ -96,7 +96,7 @@ author: "Jan-Piet Mens (@jpmens)"
EXAMPLES = '''
- name: Publish a message on an MQTT topic
mqtt:
community.general.mqtt:
topic: 'service/ansible/{{ ansible_hostname }}'
payload: 'Hello at {{ ansible_date_time.iso8601 }}'
qos: 0

View file

@ -48,7 +48,7 @@ extends_documentation_fragment:
EXAMPLES = """
- name: Send notification message via Nexmo
nexmo:
community.general.nexmo:
api_key: 640c8a53
api_secret: 0ce239a6
src: 12345678901

View file

@ -50,12 +50,12 @@ options:
EXAMPLES = """
- name: Create a simple Connector Card
office_365_connector_card:
community.general.office_365_connector_card:
webhook: https://outlook.office.com/webhook/GUID/IncomingWebhook/GUID/GUID
text: 'Hello, World!'
- name: Create a Connector Card with the full format
office_365_connector_card:
community.general.office_365_connector_card:
webhook: https://outlook.office.com/webhook/GUID/IncomingWebhook/GUID/GUID
summary: This is the summary property
title: This is the **card's title** property

View file

@ -51,13 +51,13 @@ notes:
EXAMPLES = '''
- name: Sends a push notification to a device
pushbullet:
community.general.pushbullet:
api_key: "ABC123abc123ABC123abc123ABC123ab"
device: "Chrome"
title: "You may see this on Google Chrome"
- name: Sends a link to a device
pushbullet:
community.general.pushbullet:
api_key: ABC123abc123ABC123abc123ABC123ab
device: Chrome
push_type: link
@ -65,13 +65,13 @@ EXAMPLES = '''
body: https://docs.ansible.com/
- name: Sends a push notification to a channel
pushbullet:
community.general.pushbullet:
api_key: ABC123abc123ABC123abc123ABC123ab
channel: my-awesome-channel
title: Broadcasting a message to the #my-awesome-channel folks
- name: Sends a push notification with title and body to a channel
pushbullet:
community.general.pushbullet:
api_key: ABC123abc123ABC123abc123ABC123ab
channel: my-awesome-channel
title: ALERT! Signup service is down

View file

@ -44,14 +44,14 @@ author: "Jim Richardson (@weaselkeeper)"
EXAMPLES = '''
- name: Send notifications via pushover.net
pushover:
community.general.pushover:
msg: '{{ inventory_hostname }} is acting strange ...'
app_token: wxfdksl
user_key: baa5fe97f2c5ab3ca8f0bb59
delegate_to: localhost
- name: Send notifications via pushover.net
pushover:
community.general.pushover:
title: 'Alert!'
msg: '{{ inventory_hostname }} has exploded in flames, It is now time to panic'
pri: 1

View file

@ -84,14 +84,14 @@ options:
EXAMPLES = """
- name: Send notification message via Rocket Chat
rocketchat:
community.general.rocketchat:
token: thetoken/generatedby/rocketchat
domain: chat.example.com
msg: '{{ inventory_hostname }} completed'
delegate_to: localhost
- name: Send notification message via Rocket Chat all options
rocketchat:
community.general.rocketchat:
domain: chat.example.com
token: thetoken/generatedby/rocketchat
msg: '{{ inventory_hostname }} completed'
@ -102,7 +102,7 @@ EXAMPLES = """
delegate_to: localhost
- name: Insert a color bar in front of the message for visibility purposes and use the default webhook icon and name configured in rocketchat
rocketchat:
community.general.rocketchat:
token: thetoken/generatedby/rocketchat
domain: chat.example.com
msg: '{{ inventory_hostname }} is alive!'
@ -112,7 +112,7 @@ EXAMPLES = """
delegate_to: localhost
- name: Use the attachments API
rocketchat:
community.general.rocketchat:
token: thetoken/generatedby/rocketchat
domain: chat.example.com
attachments:

View file

@ -35,7 +35,7 @@ author:
EXAMPLES = '''
- name: Makes a computer to speak
say:
community.general.say:
msg: '{{ inventory_hostname }} is all done'
voice: Zarvox
delegate_to: localhost

View file

@ -75,7 +75,7 @@ author: "Matt Makai (@makaimc)"
EXAMPLES = '''
- name: Send an email to a single recipient that the deployment was successful
sendgrid:
community.general.sendgrid:
username: "{{ sendgrid_username }}"
password: "{{ sendgrid_password }}"
from_address: "ansible@mycompany.com"
@ -86,7 +86,7 @@ EXAMPLES = '''
delegate_to: localhost
- name: Send an email to more than one recipient that the build failed
sendgrid:
community.general.sendgrid:
username: "{{ sendgrid_username }}"
password: "{{ sendgrid_password }}"
from_address: "build@mycompany.com"

View file

@ -105,13 +105,13 @@ options:
EXAMPLES = """
- name: Send notification message via Slack
slack:
community.general.slack:
token: thetoken/generatedby/slack
msg: '{{ inventory_hostname }} completed'
delegate_to: localhost
- name: Send notification message via Slack all options
slack:
community.general.slack:
token: thetoken/generatedby/slack
msg: '{{ inventory_hostname }} completed'
channel: '#ansible'
@ -123,7 +123,7 @@ EXAMPLES = """
delegate_to: localhost
- name: Insert a color bar in front of the message for visibility purposes and use the default webhook icon and name configured in Slack
slack:
community.general.slack:
token: thetoken/generatedby/slack
msg: '{{ inventory_hostname }} is alive!'
color: good
@ -131,7 +131,7 @@ EXAMPLES = """
icon_url: ''
- name: Insert a color bar in front of the message with valid hex color value
slack:
community.general.slack:
token: thetoken/generatedby/slack
msg: 'This message uses color in hex value'
color: '#00aacc'
@ -139,7 +139,7 @@ EXAMPLES = """
icon_url: ''
- name: Use the attachments API
slack:
community.general.slack:
token: thetoken/generatedby/slack
attachments:
- text: Display my system load on host A and B
@ -154,23 +154,23 @@ EXAMPLES = """
short: True
- name: Send a message with a link using Slack markup
slack:
community.general.slack:
token: thetoken/generatedby/slack
msg: We sent this message using <https://www.ansible.com|Ansible>!
- name: Send a message with angle brackets and ampersands
slack:
community.general.slack:
token: thetoken/generatedby/slack
msg: This message has &lt;brackets&gt; &amp; ampersands in plain text.
- name: Initial Threaded Slack message
slack:
community.general.slack:
channel: '#ansible'
token: xoxb-1234-56789abcdefghijklmnop
msg: 'Starting a thread with my initial post.'
register: slack_response
- name: Add more info to thread
slack:
community.general.slack:
channel: '#ansible'
token: xoxb-1234-56789abcdefghijklmnop
thread_id: "{{ slack_response['ts'] }}"

View file

@ -45,18 +45,18 @@ author:
EXAMPLES = r'''
- name: Simple Usage
syslogger:
community.general.syslogger:
msg: "I will end up as daemon.info"
- name: Send a log message with err priority and user facility with log_pid
syslogger:
community.general.syslogger:
msg: "Hello from Ansible"
priority: "err"
facility: "user"
log_pid: true
- name: Specify the name of application which is sending log message
syslogger:
community.general.syslogger:
ident: "MyApp"
msg: "I want to believe"
priority: "alert"

View file

@ -45,7 +45,7 @@ options:
EXAMPLES = """
- name: Send a message to chat in playbook
telegram:
community.general.telegram:
token: '9999999:XXXXXXXXXXXXXXXXXXXXXXX'
chat_id: 000000
msg: Ansible task finished

View file

@ -56,7 +56,7 @@ EXAMPLES = '''
# note: replace account_sid and auth_token values with your credentials
# and you have to have the 'from_number' on your Twilio account
- name: Send a text message to a mobile phone through Twilio
twilio:
community.general.twilio:
msg: All servers with webserver role are now configured.
account_sid: ACXXXXXXXXXXXXXXXXX
auth_token: ACXXXXXXXXXXXXXXXXX
@ -68,7 +68,7 @@ EXAMPLES = '''
# note: replace account_sid and auth_token values with your credentials
# and you have to have the 'from_number' on your Twilio account
- name: Send a text message to a mobile phone through Twilio
twilio:
community.general.twilio:
msg: This server configuration is now complete.
account_sid: ACXXXXXXXXXXXXXXXXX
auth_token: ACXXXXXXXXXXXXXXXXX
@ -84,7 +84,7 @@ EXAMPLES = '''
# note: replace account_sid and auth_token values with your credentials
# and you have to have the 'from_number' on your Twilio account
- name: Send a text message to a mobile phone through Twilio
twilio:
community.general.twilio:
msg: Deployment complete!
account_sid: ACXXXXXXXXXXXXXXXXX
auth_token: ACXXXXXXXXXXXXXXXXX

View file

@ -37,7 +37,7 @@ author: "Takashi Someda (@tksmd)"
EXAMPLES = '''
- name: Send a message to typetalk
typetalk:
community.general.typetalk:
client_id: 12345
client_secret: 12345
topic: 1