�
�Udac @` s� d d l m Z m Z m Z e Z i d d 6d g d 6d d 6Z d Z d Z d d
l m
Z
d d l m Z d d l
m Z d
� Z e d k r� e � n d S( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont previewt statust communityt supported_bys�
---
module: flowdock
version_added: "1.2"
author: "Matt Coddington (@mcodd)"
short_description: Send a message to a flowdock
description:
- Send a message to a flowdock team inbox or chat using the push API (see https://www.flowdock.com/api/team-inbox and https://www.flowdock.com/api/chat)
options:
token:
description:
- API token.
required: true
type:
description:
- Whether to post to 'inbox' or 'chat'
required: true
choices: [ "inbox", "chat" ]
msg:
description:
- Content of the message
required: true
tags:
description:
- tags of the message, separated by commas
required: false
external_user_name:
description:
- (chat only - required) Name of the "user" sending the message
required: false
from_address:
description:
- (inbox only - required) Email address of the message sender
required: false
source:
description:
- (inbox only - required) Human readable identifier of the application that uses the Flowdock API
required: false
subject:
description:
- (inbox only - required) Subject line of the message
required: false
from_name:
description:
- (inbox only) Name of the message sender
required: false
reply_to:
description:
- (inbox only) Email address for replies
required: false
project:
description:
- (inbox only) Human readable identifier for more detailed message categorization
required: false
link:
description:
- (inbox only) Link associated with the message. This will be used to link the message subject in Team Inbox.
required: false
validate_certs:
description:
- If C(no), SSL certificates will not be validated. This should only be used
on personally controlled sites using self-signed certificates.
required: false
default: 'yes'
type: bool
version_added: 1.5.1
requirements: [ ]
s"
- flowdock:
type: inbox
token: AAAAAA
from_address: [email protected]
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
( t
AnsibleModule( t urlencode( t fetch_urlc ! C` s8 t d t d t d t d t � d t d t � d t d t d d d g � d
t d t � d t d t � d t d t � d
t d t � d t d t � d t d t � d t d t � d t d t � d t d t � d t d d d d � �
d t � } | j d } | j d } | d k r&d | } n
d | } i } | j d | d <| j d
r�| d k rs| j d d � q�| j d
| d
<n | d k r�| j d d � n x~ d d d
g D]m } | j | r | d k r�| j d d | � q#| j | | | <q�| d k r�| j d d | � q�q�W| j d rH| j d | d <n x^ d d d d g D]J } | j | r[| d k r�| j d d | � q�| j | | | <q[q[W| j r�| j d t � n t | � } t | | d | �\ } } | d! d"