1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Native YAML - notifications (#3598)

This commit is contained in:
Fabio Alessandro Locati 2016-12-01 12:31:20 +00:00 committed by Matt Clay
parent 951b87492a
commit 75563d5325
9 changed files with 59 additions and 39 deletions

View file

@ -60,10 +60,18 @@ author: "Adam Garside (@fabulops)"
'''
EXAMPLES = '''
- campfire: subscription=foo token=12345 room=123 msg="Task completed."
- campfire:
subscription: foo
token: 12345
room: 123
msg: Task completed.
- campfire: subscription=foo token=12345 room=123 notify=loggins
msg="Task completed ... with feeling."
- campfire:
subscription: foo
token: 12345
room: 123
notify: loggins
msg: Task completed ... with feeling.
'''
import cgi

View file

@ -89,18 +89,20 @@ requirements: [ ]
'''
EXAMPLES = '''
- flowdock: type=inbox
token=AAAAAA
from_address=user@example.com
source='my cool app'
msg='test from ansible'
subject='test subject'
- flowdock:
type: inbox
token: AAAAAA
from_address: user@example.com
source: my cool app
msg: test from ansible
subject: test subject
- flowdock: type=chat
token=AAAAAA
external_user_name=testuser
msg='test from ansible'
tags=tag1,tag2,tag3
- flowdock:
type: chat
token: AAAAAA
external_user_name: testuser
msg: test from ansible
tags: tag1,tag2,tag3
'''
import urllib

View file

@ -81,15 +81,16 @@ author: "WAKAYAMA Shirou (@shirou), BOURDEL Paul (@pb8226)"
'''
EXAMPLES = '''
- hipchat: room=notify msg="Ansible task finished"
- hipchat:
room: notif
msg: Ansible task finished
# Use Hipchat API version 2
- hipchat:
api: "https://api.hipchat.com/v2/"
api: 'https://api.hipchat.com/v2/'
token: OAUTH2_TOKEN
room: notify
msg: "Ansible task finished"
msg: Ansible task finished
'''
# ===========================================

View file

@ -78,12 +78,13 @@ EXAMPLES = '''
msg="Ansible task finished"
# send a message, specifying the host and port
- jabber user=mybot@example.net
host=talk.example.net
port=5223
password=secret
to=mychaps@example.net
msg="Ansible task finished"
- jabber
user: mybot@example.net
host: talk.example.net
port: 5223
password: secret
to: mychaps@example.net
msg: Ansible task finished
'''
import os

View file

@ -146,11 +146,11 @@ EXAMPLES = '''
charset=utf8
# Sending an e-mail using the remote machine, not the Ansible controller node
- mail:
host='localhost'
port=25
to="John Smith <john.smith@example.com>"
subject='Ansible-report'
body='System {{ ansible_hostname }} has been successfully provisioned.'
host: localhost
port: 25
to: 'John Smith <john.smith@example.com>'
subject: Ansible-report
body: 'System {{ ansible_hostname }} has been successfully provisioned.'
'''
import os

View file

@ -41,7 +41,10 @@ author: Michael DeHaan
'''
EXAMPLES = '''
- local_action: osx_say msg="{{inventory_hostname}} is all done" voice=Zarvox
- osx_say:
msg: '{{ inventory_hostname }} is all done'
voice: Zarvox
delegate_to: localhost
'''
DEFAULT_VOICE='Trinoids'

View file

@ -53,8 +53,11 @@ author: "Jim Richardson (@weaselkeeper)"
'''
EXAMPLES = '''
- local_action: pushover msg="{{inventory_hostname}} has exploded in flames,
It is now time to panic" app_token=wxfdksl user_key=baa5fe97f2c5ab3ca8f0bb59
- pushover:
msg: '{{ inventory_hostname }} has exploded in flames, It is now time to panic'
app_token: wxfdksl
user_key: baa5fe97f2c5ab3ca8f0bb59
delegate_to: localhost
'''
import urllib

View file

@ -51,10 +51,10 @@ options:
EXAMPLES = """
send a message to chat in playbook
- telegram: token=bot9999999:XXXXXXXXXXXXXXXXXXXXXXX
chat_id=000000
msg="Ansible task finished"
- telegram:
token: 'bot9999999:XXXXXXXXXXXXXXXXXXXXXXX'
chat_id: 000000
msg: Ansible task finished
"""
RETURN = """
@ -64,8 +64,6 @@ msg:
returned: success
type: string
sample: "Ansible task finished"
"""
import urllib

View file

@ -44,7 +44,11 @@ author: "Takashi Someda (@tksmd)"
'''
EXAMPLES = '''
- typetalk: client_id=12345 client_secret=12345 topic=1 msg="install completed"
- typetalk:
client_id: 12345
client_secret: 12345
topic: 1
msg: install completed
'''
import urllib