Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/modules/notification/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/modules/notification/matrix.pyc

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
Z
ddlmZm
Z
dZydd
lmZWn#ek
r�e
j�ZeZnXeZd�Zd�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	communitytsupported_bys#
---
author: "Jan Christian Grünhage (@jcgruenhage)"
module: matrix
short_description: Send notifications to matrix
description:
    - This module sends html formatted notifications to matrix rooms.
version_added: "2.8"
options:
    msg_plain:
        description:
            - Plain text form of the message to send to matrix, usually markdown
        required: true
    msg_html:
        description:
            - HTML form of the message to send to matrix
        required: true
    room_id:
        description:
            - ID of the room to send the notification to
        required: true
    hs_url:
        description:
            - URL of the homeserver, where the CS-API is reachable
        required: true
    token:
        description:
            - Authentication token for the API call. If provided, user_id and password are not required
    user_id:
        description:
            - The user id of the user
    password:
        description:
            - The password to log in with
requirements:
    -  matrix-client (Python library)
s
- name: Send matrix notification with token
  matrix:
    msg_plain: "**hello world**"
    msg_html: "<b>hello world</b>"
    room_id: "!12345678:server.tld"
    hs_url: "https://matrix.org"
    token: "{{ matrix_auth_token }}"

- name: Send matrix notification with user_id and password
  matrix:
    msg_plain: "**hello world**"
    msg_html: "<b>hello world</b>"
    room_id: "!12345678:server.tld"
    hs_url: "https://matrix.org"
    user_id: "ansible_notification_bot"
    password: "{{ matrix_auth_password }}"
t
N(t
AnsibleModuletmissing_required_lib(tMatrixClientcC`s�tdtdddt�dtdddt�dtdddt�dtdddt�dtdddtd	t�d
tdddt�dtdddtd	t��}tdtd
d�}td|dddggdddggdd
dggdt�}ts$|jdtd�dt�n|jr1|St	|j
d�}|j
ddk	rm|j
d|j_
n$|j|j
d
|j
ddt�|j|j
d�}|j|j
d|j
d�|j|�dS(Nt	msg_plainttypetstrtrequiredtmsg_htmltroom_idths_urlttokentno_logtuser_idtpasswordtchangedtmessagett
argument_spectmutually_exclusivetrequired_one_oftrequired_togethertsupports_check_modetmsgs
matrix-clientt	exceptiontsync(tdicttTruetFalseR	tmatrix_foundt	fail_jsonR
tMATRIX_IMP_ERRt
check_modeRtparamstNonetapiRtlogint	join_roomt	send_htmlt	exit_json(tmodule_argstresulttmoduletclienttroom((sG/usr/lib/python2.7/site-packages/ansible/modules/notification/matrix.pyt
run_moduleYs8			$cC`st�dS(N(R5(((sG/usr/lib/python2.7/site-packages/ansible/modules/notification/matrix.pytmain�st__main__(t
__future__RRRR
t
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNt	tracebacktansible.module_utils.basicR	R
R*R'tmatrix_client.clientRtImportErrort
format_excR$R%R#R5R6t__name__(((sG/usr/lib/python2.7/site-packages/ansible/modules/notification/matrix.pyt<module>s*

'

	-	

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]