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:
parent
951b87492a
commit
75563d5325
9 changed files with 59 additions and 39 deletions
|
@ -60,10 +60,18 @@ author: "Adam Garside (@fabulops)"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
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
|
- campfire:
|
||||||
msg="Task completed ... with feeling."
|
subscription: foo
|
||||||
|
token: 12345
|
||||||
|
room: 123
|
||||||
|
notify: loggins
|
||||||
|
msg: Task completed ... with feeling.
|
||||||
'''
|
'''
|
||||||
|
|
||||||
import cgi
|
import cgi
|
||||||
|
|
|
@ -89,18 +89,20 @@ requirements: [ ]
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
- flowdock: type=inbox
|
- flowdock:
|
||||||
token=AAAAAA
|
type: inbox
|
||||||
from_address=user@example.com
|
token: AAAAAA
|
||||||
source='my cool app'
|
from_address: user@example.com
|
||||||
msg='test from ansible'
|
source: my cool app
|
||||||
subject='test subject'
|
msg: test from ansible
|
||||||
|
subject: test subject
|
||||||
|
|
||||||
- flowdock: type=chat
|
- flowdock:
|
||||||
token=AAAAAA
|
type: chat
|
||||||
external_user_name=testuser
|
token: AAAAAA
|
||||||
msg='test from ansible'
|
external_user_name: testuser
|
||||||
tags=tag1,tag2,tag3
|
msg: test from ansible
|
||||||
|
tags: tag1,tag2,tag3
|
||||||
'''
|
'''
|
||||||
|
|
||||||
import urllib
|
import urllib
|
||||||
|
|
|
@ -81,15 +81,16 @@ author: "WAKAYAMA Shirou (@shirou), BOURDEL Paul (@pb8226)"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
- hipchat: room=notify msg="Ansible task finished"
|
- hipchat:
|
||||||
|
room: notif
|
||||||
|
msg: Ansible task finished
|
||||||
|
|
||||||
# Use Hipchat API version 2
|
# Use Hipchat API version 2
|
||||||
|
|
||||||
- hipchat:
|
- hipchat:
|
||||||
api: "https://api.hipchat.com/v2/"
|
api: 'https://api.hipchat.com/v2/'
|
||||||
token: OAUTH2_TOKEN
|
token: OAUTH2_TOKEN
|
||||||
room: notify
|
room: notify
|
||||||
msg: "Ansible task finished"
|
msg: Ansible task finished
|
||||||
'''
|
'''
|
||||||
|
|
||||||
# ===========================================
|
# ===========================================
|
||||||
|
|
|
@ -78,12 +78,13 @@ EXAMPLES = '''
|
||||||
msg="Ansible task finished"
|
msg="Ansible task finished"
|
||||||
|
|
||||||
# send a message, specifying the host and port
|
# send a message, specifying the host and port
|
||||||
- jabber user=mybot@example.net
|
- jabber
|
||||||
host=talk.example.net
|
user: mybot@example.net
|
||||||
port=5223
|
host: talk.example.net
|
||||||
password=secret
|
port: 5223
|
||||||
to=mychaps@example.net
|
password: secret
|
||||||
msg="Ansible task finished"
|
to: mychaps@example.net
|
||||||
|
msg: Ansible task finished
|
||||||
'''
|
'''
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
|
@ -146,11 +146,11 @@ EXAMPLES = '''
|
||||||
charset=utf8
|
charset=utf8
|
||||||
# Sending an e-mail using the remote machine, not the Ansible controller node
|
# Sending an e-mail using the remote machine, not the Ansible controller node
|
||||||
- mail:
|
- mail:
|
||||||
host='localhost'
|
host: localhost
|
||||||
port=25
|
port: 25
|
||||||
to="John Smith <john.smith@example.com>"
|
to: 'John Smith <john.smith@example.com>'
|
||||||
subject='Ansible-report'
|
subject: Ansible-report
|
||||||
body='System {{ ansible_hostname }} has been successfully provisioned.'
|
body: 'System {{ ansible_hostname }} has been successfully provisioned.'
|
||||||
'''
|
'''
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
|
@ -41,7 +41,10 @@ author: Michael DeHaan
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
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'
|
DEFAULT_VOICE='Trinoids'
|
||||||
|
|
|
@ -53,8 +53,11 @@ author: "Jim Richardson (@weaselkeeper)"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
- local_action: pushover msg="{{inventory_hostname}} has exploded in flames,
|
- pushover:
|
||||||
It is now time to panic" app_token=wxfdksl user_key=baa5fe97f2c5ab3ca8f0bb59
|
msg: '{{ inventory_hostname }} has exploded in flames, It is now time to panic'
|
||||||
|
app_token: wxfdksl
|
||||||
|
user_key: baa5fe97f2c5ab3ca8f0bb59
|
||||||
|
delegate_to: localhost
|
||||||
'''
|
'''
|
||||||
|
|
||||||
import urllib
|
import urllib
|
||||||
|
|
|
@ -51,10 +51,10 @@ options:
|
||||||
EXAMPLES = """
|
EXAMPLES = """
|
||||||
|
|
||||||
send a message to chat in playbook
|
send a message to chat in playbook
|
||||||
- telegram: token=bot9999999:XXXXXXXXXXXXXXXXXXXXXXX
|
- telegram:
|
||||||
chat_id=000000
|
token: 'bot9999999:XXXXXXXXXXXXXXXXXXXXXXX'
|
||||||
msg="Ansible task finished"
|
chat_id: 000000
|
||||||
|
msg: Ansible task finished
|
||||||
"""
|
"""
|
||||||
|
|
||||||
RETURN = """
|
RETURN = """
|
||||||
|
@ -64,8 +64,6 @@ msg:
|
||||||
returned: success
|
returned: success
|
||||||
type: string
|
type: string
|
||||||
sample: "Ansible task finished"
|
sample: "Ansible task finished"
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import urllib
|
import urllib
|
||||||
|
|
|
@ -44,7 +44,11 @@ author: "Takashi Someda (@tksmd)"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
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
|
import urllib
|
||||||
|
|
Loading…
Reference in a new issue