Anons79 Mini Shell

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

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zdd
l	Z	dd
l
Z
eZd
Zydd
lZWn#ek
r�e
j�ZeZnXddlmZmZddlmZd
�Zedkr�e�nd
S(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontstableinterfacetstatust	communitytsupported_bysI
---
version_added: "1.2"
module: jabber
short_description: Send a message to jabber user or chat room
description:
   - Send a message to jabber
options:
  user:
    description:
      - User as which to connect
    required: true
  password:
    description:
      - password for user to connect
    required: true
  to:
    description:
      - user ID or name of the room, when using room use a slash to indicate your nick.
    required: true
  msg:
    description:
      - The message body.
    required: true
  host:
    description:
      - host to connect, overrides user info
  port:
    description:
      - port to connect to, overrides default
    default: 5222
  encoding:
    description:
      - message encoding

# informational: requirements for nodes
requirements:
    - python xmpp (xmpppy)
author: "Brian Coca (@bcoca)"
s	
# send a message to a user
- jabber:
    user: [email protected]
    password: secret
    to: [email protected]
    msg: Ansible task finished

# send a message to a room
- jabber:
    user: [email protected]
    password: secret
    to: [email protected]/ansiblebot
    msg: Ansible task finished

# send a message, specifying the host and port
- jabber:
    user: [email protected]
    host: talk.example.net
    port: 5223
    password: secret
    to: [email protected]
    msg: Ansible task finished
N(t
AnsibleModuletmissing_required_lib(t	to_nativec
C`sdtdtdtdt�dtdtdt�dtdt�dtdt�dtdt�d	tdtd
ddd
�dtdt��dt�}ts�|jdtd�dt�ntj	|j
d�}|j�}|j�}|j
d	}|j
d}y#|j
dj
dd�\}}Wn%tk
rJ|j
dd}}nX|j
drh|j
d}n|}|j
dr�|j
dtj_ntjjd|j
d�}	yOtj|dg�}
|
jd||f�s�|jdddd|�n|
j||d�s2|jdddd||f�n|
jdd�|r�|	jd�|	jddd �tjd|j
d�}|jddd!�|
j|�tjd�n
|	jd"�|	j|�|js�|
j|	�ntjd�|
j �Wn9t!k
r7}|jdd#t"|�dt#j$��nX|j%d$td|d|d|	j&��dS(%Nt
argument_spectusertrequiredtpasswordtno_logttotmsgthosttporttdefaultifttypetinttencodingtsupports_check_modetxmpppyt	exceptiont/itbodytdebugtservertrcsFailed to connect to server: %stAnsiblesFailed to authorize %s on: %st
requestRosterit	groupchattxt	namespaces#http://jabber.org/protocol/muc#usershttp://jabber.org/protocol/muctchatsunable to send msg: %stchanged('RtdicttTruetFalsetHAS_XMPPt	fail_jsonR	tXMPP_IMP_ERRtxmpptJIDtparamstgetNodet	getDomaintsplitt
ValueErrortNonet	simplexmltENCODINGtprotocoltMessagetClienttconnecttauthtsendInitPresencetsetTypetsetTagtPresencetsendttimetsleeptsetTot
check_modet
disconnectt	ExceptionR
t	tracebackt
format_exct	exit_jsontgetBody(
tmoduletjidRRRRRtnickRRtconntjointe((sG/usr/lib/python2.7/site-packages/ansible/modules/notification/jabber.pytmainasd	

#


#



	
*t__main__(t
__future__RRRRt
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLESRARGR(R*R4R,R-tImportErrorRHR)tansible.module_utils.basicRR	tansible.module_utils._textR
RQt__name__(((sG/usr/lib/python2.7/site-packages/ansible/modules/notification/jabber.pyt<module>s(


*

	C

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