AnonSec Shell
Server IP : 85.193.89.191  /  Your IP : 3.128.197.9
Web Server : Apache
System : Linux 956367-cx40159.tmweb.ru 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64
User : bitrix ( 600)
PHP Version : 8.1.27
Disable Function : NONE
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/979/cwd/lib/python2.7/site-packages/ansible/plugins/callback/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /proc/979/cwd/lib/python2.7/site-packages/ansible/plugins/callback/jabber.pyo
�
��\c@`s�ddlmZmZmZeZdZddlZeZ	yddl
Z
Wnek
rceZ	nXddl
mZdefd��YZdS(i(tabsolute_importtdivisiontprint_functions�
    callback: jabber
    type: notification
    short_description: post task events to a jabber server
    description:
      - The chatty part of ChatOps with a Hipchat server as a target
      - This callback plugin sends status updates to a HipChat channel during playbook execution.
    version_added: "2.2"
    requirements:
      - xmpp (python lib https://github.com/ArchipelProject/xmpppy)
    options:
      server:
        description: connection info to jabber server
        required: True
        env:
          - name: JABBER_SERV
      user:
        description: Jabber user to authenticate as
        required: True
        env:
          - name: JABBER_USER
      password:
        description: Password for the user to the jabber server
        required: True
        env:
          - name: JABBER_PASS
      to:
        description: chat identifier that will recieve the message
        required: True
        env:
          - name: JABBER_TO
N(tCallbackBasetCallbackModulecB`sYeZdZdZdZeZd	d�Zd�Z	d�Z
d�Zd�Zd�Z
RS(
g@tnotificationtjabbercC`s�tt|�jd|�ts;|jjd�t|_ntj	d�|_
tj	d�|_tj	d�|_tj	d�|_
|jp�|jp�|j
p�|j
dkr�t|_|jjd�ndS(NtdisplaysuThe required python xmpp library (xmpppy) is not installed. pip install git+https://github.com/ArchipelProject/xmpppytJABBER_SERVtJABBER_USERtJABBER_PASSt	JABBER_TOscJabber CallBack wants the JABBER_SERV, JABBER_USER, JABBER_PASS and JABBER_TO environment variables(tsuperRt__init__tHAS_XMPPt_displaytwarningtTruetdisabledtostgetenvtservtj_usertj_passtj_totNone(tselfR((sC/usr/lib/python2.7/site-packages/ansible/plugins/callback/jabber.pyR
;s*	cC`s�tj|j�}tj|jdg�}|jd|jdf�|j|j�|jd|j	��tj
|j|�}|jdd�|j
|�|j�dS(sSend messagetdebugtserveriftresourcettypetchatN(txmpptJIDRtClientRtconnecttauthtgetNodeRtgetResourcetMessageRtsetAttrtsendt
disconnect(Rtmsgtjidtclienttmessage((sC/usr/lib/python2.7/site-packages/ansible/plugins/callback/jabber.pytsend_msgMs%
cC`s2|j|j|jj�|j|j�|_dS(N(t_clean_resultst_resultt_tasktactiont
_dump_resultsR(Rtresult((sC/usr/lib/python2.7/site-packages/ansible/plugins/callback/jabber.pytv2_runner_on_okXscC`s
||_dS(N(ttask(RR7tis_conditional((sC/usr/lib/python2.7/site-packages/ansible/plugins/callback/jabber.pytv2_playbook_on_task_start\scC`s'||_|j}|jd|�dS(s(Display Playbook and play start messagessAnsible starting play: %sN(tplaytnameR/(RR:R;((sC/usr/lib/python2.7/site-packages/ansible/plugins/callback/jabber.pytv2_playbook_on_play_start_s		c	C`s�|j}t|jj��}t}t}xO|D]G}|j|�}|ddkr_t}n|ddkr1t}q1q1W|s�|r�|j}|jd||j	||f�n#|j}|jd|||f�dS(Ntfailuresitunreachables2%s: Failures detected 
%s 
Host: %s
 Failed at:
%ss9Great! 
 Playbook %s completed:
%s 
 Last task debug:
 %s(
R:tsortedt	processedtkeystFalset	summarizeRRR/R7(	RtstatsR;thostsR=R>thtstout((sC/usr/lib/python2.7/site-packages/ansible/plugins/callback/jabber.pytplaybook_on_statses	
	
	#	N(t__name__t
__module__tCALLBACK_VERSIONt
CALLBACK_TYPEt
CALLBACK_NAMERtCALLBACK_NEEDS_WHITELISTRR
R/R6R9R<RI(((sC/usr/lib/python2.7/site-packages/ansible/plugins/callback/jabber.pyR4s				(t
__future__RRRRt
__metaclass__t
DOCUMENTATIONRRRR tImportErrorRBtansible.plugins.callbackRR(((sC/usr/lib/python2.7/site-packages/ansible/plugins/callback/jabber.pyt<module>s!



Anon7 - 2022
AnonSec Team