mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-29 16:11:22 -07:00
Fix Ansible documentation in part of example formatting (#334)
This commit is contained in:
parent
58ed77e851
commit
983d937b7b
58 changed files with 376 additions and 353 deletions
|
@ -52,13 +52,15 @@ author: "Adam Garside (@fabulops)"
|
|||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
- campfire:
|
||||
- name: Send a message to Campfire
|
||||
campfire:
|
||||
subscription: foo
|
||||
token: 12345
|
||||
room: 123
|
||||
msg: Task completed.
|
||||
|
||||
- campfire:
|
||||
- name: Send a message to Campfire
|
||||
campfire:
|
||||
subscription: foo
|
||||
token: 12345
|
||||
room: 123
|
||||
|
|
|
@ -77,7 +77,8 @@ requirements: [ ]
|
|||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
- flowdock:
|
||||
- name: Send a message to a flowdock
|
||||
flowdock:
|
||||
type: inbox
|
||||
token: AAAAAA
|
||||
from_address: user@example.com
|
||||
|
@ -85,7 +86,8 @@ EXAMPLES = '''
|
|||
msg: test from ansible
|
||||
subject: test subject
|
||||
|
||||
- flowdock:
|
||||
- name: Send a message to a flowdock
|
||||
flowdock:
|
||||
type: chat
|
||||
token: AAAAAA
|
||||
external_user_name: testuser
|
||||
|
|
|
@ -47,10 +47,11 @@ author: "Jonas Pfenniger (@zimbatm)"
|
|||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
- grove: >
|
||||
channel_token=6Ph62VBBJOccmtTPZbubiPzdrhipZXtg
|
||||
service=my-app
|
||||
message=deployed {{ target }}
|
||||
- name: Sends a notification to a grove.io channel
|
||||
grove:
|
||||
channel_token: 6Ph62VBBJOccmtTPZbubiPzdrhipZXtg
|
||||
service: my-app
|
||||
message: 'deployed {{ target }}'
|
||||
'''
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
|
|
@ -65,12 +65,13 @@ author:
|
|||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
- hipchat:
|
||||
- name: Send a message to a Hipchat room
|
||||
hipchat:
|
||||
room: notif
|
||||
msg: Ansible task finished
|
||||
|
||||
# Use Hipchat API version 2
|
||||
- hipchat:
|
||||
- name: Send a message to a Hipchat room using Hipchat API version 2
|
||||
hipchat:
|
||||
api: https://api.hipchat.com/v2/
|
||||
token: OAUTH2_TOKEN
|
||||
room: notify
|
||||
|
|
|
@ -83,12 +83,14 @@ author:
|
|||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
- irc:
|
||||
- name: Send a message to an IRC channel from nick ansible
|
||||
irc:
|
||||
server: irc.example.net
|
||||
channel: #t1
|
||||
msg: Hello world
|
||||
|
||||
- local_action:
|
||||
- name: Send a message to an IRC channel
|
||||
local_action:
|
||||
module: irc
|
||||
port: 6669
|
||||
server: irc.example.net
|
||||
|
@ -97,7 +99,8 @@ EXAMPLES = '''
|
|||
color: red
|
||||
nick: ansibleIRC
|
||||
|
||||
- local_action:
|
||||
- name: Send a message to an IRC channel
|
||||
local_action:
|
||||
module: irc
|
||||
port: 6669
|
||||
server: irc.example.net
|
||||
|
|
|
@ -49,22 +49,22 @@ author: "Brian Coca (@bcoca)"
|
|||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
# send a message to a user
|
||||
- jabber:
|
||||
- name: Send a message to a user
|
||||
jabber:
|
||||
user: mybot@example.net
|
||||
password: secret
|
||||
to: friend@example.net
|
||||
msg: Ansible task finished
|
||||
|
||||
# send a message to a room
|
||||
- jabber:
|
||||
- name: Send a message to a room
|
||||
jabber:
|
||||
user: mybot@example.net
|
||||
password: secret
|
||||
to: mychaps@conference.example.net/ansiblebot
|
||||
msg: Ansible task finished
|
||||
|
||||
# send a message, specifying the host and port
|
||||
- jabber:
|
||||
- name: Send a message, specifying the host and port
|
||||
jabber:
|
||||
user: mybot@example.net
|
||||
host: talk.example.net
|
||||
port: 5223
|
||||
|
|
|
@ -39,7 +39,8 @@ author: "Jimmy Tang (@jcftang) <jimmy_tang@rapid7.com>"
|
|||
RETURN = '''# '''
|
||||
|
||||
EXAMPLES = '''
|
||||
- logentries_msg:
|
||||
- name: Send a message to logentries
|
||||
logentries_msg:
|
||||
token=00000000-0000-0000-0000-000000000000
|
||||
msg="{{ ansible_hostname }}"
|
||||
'''
|
||||
|
|
|
@ -95,7 +95,8 @@ author: "Jan-Piet Mens (@jpmens)"
|
|||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
- mqtt:
|
||||
- name: Publish a message on an MQTT topic
|
||||
mqtt:
|
||||
topic: 'service/ansible/{{ ansible_hostname }}'
|
||||
payload: 'Hello at {{ ansible_date_time.iso8601 }}'
|
||||
qos: 0
|
||||
|
|
|
@ -50,28 +50,28 @@ notes:
|
|||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
# Sends a push notification to a device
|
||||
- pushbullet:
|
||||
- name: Sends a push notification to a device
|
||||
pushbullet:
|
||||
api_key: "ABC123abc123ABC123abc123ABC123ab"
|
||||
device: "Chrome"
|
||||
title: "You may see this on Google Chrome"
|
||||
|
||||
# Sends a link to a device
|
||||
- pushbullet:
|
||||
- name: Sends a link to a device
|
||||
pushbullet:
|
||||
api_key: ABC123abc123ABC123abc123ABC123ab
|
||||
device: Chrome
|
||||
push_type: link
|
||||
title: Ansible Documentation
|
||||
body: https://docs.ansible.com/
|
||||
|
||||
# Sends a push notification to a channel
|
||||
- pushbullet:
|
||||
- name: Sends a push notification to a channel
|
||||
pushbullet:
|
||||
api_key: ABC123abc123ABC123abc123ABC123ab
|
||||
channel: my-awesome-channel
|
||||
title: Broadcasting a message to the #my-awesome-channel folks
|
||||
|
||||
# Sends a push notification with title and body to a channel
|
||||
- pushbullet:
|
||||
- name: Sends a push notification with title and body to a channel
|
||||
pushbullet:
|
||||
api_key: ABC123abc123ABC123abc123ABC123ab
|
||||
channel: my-awesome-channel
|
||||
title: ALERT! Signup service is down
|
||||
|
|
|
@ -43,13 +43,15 @@ author: "Jim Richardson (@weaselkeeper)"
|
|||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
- pushover:
|
||||
- name: Send notifications via pushover.net
|
||||
pushover:
|
||||
msg: '{{ inventory_hostname }} is acting strange ...'
|
||||
app_token: wxfdksl
|
||||
user_key: baa5fe97f2c5ab3ca8f0bb59
|
||||
delegate_to: localhost
|
||||
|
||||
- pushover:
|
||||
- name: Send notifications via pushover.net
|
||||
pushover:
|
||||
title: 'Alert!'
|
||||
msg: '{{ inventory_hostname }} has exploded in flames, It is now time to panic'
|
||||
pri: 1
|
||||
|
|
|
@ -34,7 +34,8 @@ author:
|
|||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
- say:
|
||||
- name: Makes a computer to speak
|
||||
say:
|
||||
msg: '{{ inventory_hostname }} is all done'
|
||||
voice: Zarvox
|
||||
delegate_to: localhost
|
||||
|
|
|
@ -74,8 +74,8 @@ author: "Matt Makai (@makaimc)"
|
|||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
# send an email to a single recipient that the deployment was successful
|
||||
- sendgrid:
|
||||
- name: Send an email to a single recipient that the deployment was successful
|
||||
sendgrid:
|
||||
username: "{{ sendgrid_username }}"
|
||||
password: "{{ sendgrid_password }}"
|
||||
from_address: "ansible@mycompany.com"
|
||||
|
@ -85,8 +85,8 @@ EXAMPLES = '''
|
|||
body: "The most recent Ansible deployment was successful."
|
||||
delegate_to: localhost
|
||||
|
||||
# send an email to more than one recipient that the build failed
|
||||
- sendgrid:
|
||||
- name: Send an email to more than one recipient that the build failed
|
||||
sendgrid:
|
||||
username: "{{ sendgrid_username }}"
|
||||
password: "{{ sendgrid_password }}"
|
||||
from_address: "build@mycompany.com"
|
||||
|
|
|
@ -55,7 +55,8 @@ EXAMPLES = '''
|
|||
# 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
|
||||
- twilio:
|
||||
- name: Send a text message to a mobile phone through Twilio
|
||||
twilio:
|
||||
msg: All servers with webserver role are now configured.
|
||||
account_sid: ACXXXXXXXXXXXXXXXXX
|
||||
auth_token: ACXXXXXXXXXXXXXXXXX
|
||||
|
@ -66,7 +67,8 @@ EXAMPLES = '''
|
|||
# send an SMS to multiple phone numbers about the deployment
|
||||
# note: replace account_sid and auth_token values with your credentials
|
||||
# and you have to have the 'from_number' on your Twilio account
|
||||
- twilio:
|
||||
- name: Send a text message to a mobile phone through Twilio
|
||||
twilio:
|
||||
msg: This server configuration is now complete.
|
||||
account_sid: ACXXXXXXXXXXXXXXXXX
|
||||
auth_token: ACXXXXXXXXXXXXXXXXX
|
||||
|
@ -81,7 +83,8 @@ EXAMPLES = '''
|
|||
# and an image of the results
|
||||
# note: replace account_sid and auth_token values with your credentials
|
||||
# and you have to have the 'from_number' on your Twilio account
|
||||
- twilio:
|
||||
- name: Send a text message to a mobile phone through Twilio
|
||||
twilio:
|
||||
msg: Deployment complete!
|
||||
account_sid: ACXXXXXXXXXXXXXXXXX
|
||||
auth_token: ACXXXXXXXXXXXXXXXXX
|
||||
|
|
|
@ -36,7 +36,8 @@ author: "Takashi Someda (@tksmd)"
|
|||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
- typetalk:
|
||||
- name: Send a message to typetalk
|
||||
typetalk:
|
||||
client_id: 12345
|
||||
client_secret: 12345
|
||||
topic: 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue