AnonSec Shell
Server IP : 85.193.89.191  /  Your IP : 18.118.26.112
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/selective.pyc
�
��\c@`s*ddlmZmZmZeZdZdZddlZddl	m
Zddlm
Z
ddlmZddlmZeaid	d
6djeej�d6d
d6dd6djeej�d6djeej�d6d	d6djeej�d6Zd�Zd�Zde
fd��YZdS(i(tabsolute_importtdivisiontprint_functions 
    callback: selective
    callback_type: stdout
    requirements:
      - set as main display callback
    short_description: only print certain tasks
    version_added: "2.4"
    description:
      - This callback only prints tasks that have been tagged with `print_action` or that have failed.
        This allows operators to focus on the tasks that provide value only.
      - Tasks that are not printed are placed with a '.'.
      - If you increase verbosity all tasks are printed.
    options:
      nocolor:
        default: False
        description: This setting allows suppressing colorizing output
        env:
          - name: ANSIBLE_NOCOLOR
          - name: ANSIBLE_SELECTIVE_DONT_COLORIZE
        ini:
          - section: defaults
            key: nocolor
        type: boolean
sc
  - debug: msg="This will not be printed"
  - debug: msg="But this will"
    tags: [print_action]
N(t	constants(tCallbackBase(tto_text(t	codeCodesstnormals[{0}mtokstbolds	tnot_so_boldtchangedtfailedtendctskippedcC`szt|j�|j��}i}xQ|D]I}|j|�|j|�kr)|j|�|j|�f||<q)q)W|S(s=Return a dict of keys that differ with another config object.(tsettkeystget(tprvtnxtRtresulttk((sF/usr/lib/python2.7/site-packages/ansible/plugins/callback/selective.pyt	dict_diff;s
)cC`s)tr
|Sdjt||td�SdS(s8Given a string add necessary codes to format the string.s	{0}{1}{2}R
N(t
DONT_COLORIZEtformattCOLORS(tmsgtcolor((sF/usr/lib/python2.7/site-packages/ansible/plugins/callback/selective.pytcolorizeEstCallbackModulecB`s�eZdZdZdZdZdd�Zdddd�Zdd�Z	d�Z
d�Zd	�Zd
�Z
d�Zed�Zd
�Zd�Zd�Zd�Zd�ZeZRS(sselective.py callback plugin.g@tstdoutt	selectivecC`s5tt|�j|�t|_d|_t|_dS(sselective.py callback plugin.N(tsuperRt__init__tFalsetlast_skippedtNonetlast_task_nametprinted_last_task(tselftdisplay((sF/usr/lib/python2.7/site-packages/ansible/plugins/callback/selective.pyR!Ts		cC`s8tt|�jd|d|d|�|jd�adS(Nt	task_keystvar_optionstdirecttnocolor(R Rtset_optionst
get_optionR(R'R)R*R+((sF/usr/lib/python2.7/site-packages/ansible/plugins/callback/selective.pyR-[s%cC`s}|dkr|j}n|jsyt|_d}|jrCt�ntdj|d|t|��d�}t|�ndS(Nixs	# {0} {1}t*R	(	R$R%R&tTrueR#tprintRRtlen(R't	task_nametline_lengthR((sF/usr/lib/python2.7/site-packages/ansible/plugins/callback/selective.pyt_print_taskbs			
cC`sM|j�}g}x+|D]#}|jdjd||��qWdj|�S(Ns{0}{1}t s
(t
splitlinestappendRtjoin(R'ttexttindent_leveltlinestresult_linestl((sF/usr/lib/python2.7/site-packages/ansible/plugins/callback/selective.pyt_indent_textos

!c	C`s�t|t�r�yOdjtj|dj�|dj�d|jdd�d|d��}Wq�tk
r�t|d|d�}q�Xn|r�t	t
|�d	�}t|j||d
��ndS(Ns
tbeforetaftertfromfilet
before_headertnew_filettofiletafter_headerRi(
t
isinstancetdictR9tdifflibtunified_diffR7RtAttributeErrorRRtstrR1R?(R'tdiffR;((sF/usr/lib/python2.7/site-packages/ansible/plugins/callback/selective.pyt_print_diffvs		
c	C`s	|r!d}	t|jd�}
nLd}	t|t�rXd|j�krX|d}qXntt|�d�}
|r�d}td|�}n*|r�dnd	}td
j|�|�}t||�}d}
dd
t|
�|	}djd|	|
||�}t|�dkrJ|dj|�7}tdj|d|
t|���n>tdj|d|
t|���t|j	||	d��|r�|j
||	�n|r�t|d�}t|j	||	d��n|rt|d�}t|j	||	d��ndS(NiR
itkeyR	Rs	FAILED!!!RRschanged={0}ixR6i(s{0}  * {1}{2}- {3}i2s -- {0}s{0} {1}---------t-s{0} {1}(RtnameRGRHRRRR2R1R?RN(R'thost_or_itemRRRMtis_hostterrorRtstderrR;RQRt
change_stringR4tspacestline((sF/usr/lib/python2.7/site-packages/ansible/plugins/callback/selective.pyt_print_host_or_item�s<'$cC`sdS(sRun on start of the play.N((R'tplay((sF/usr/lib/python2.7/site-packages/ansible/plugins/callback/selective.pytv2_playbook_on_play_start�scK`s|j�|_t|_dS(sRun when a task starts.N(tget_nameR%R"R&(R'ttasktkwargs((sF/usr/lib/python2.7/site-packages/ansible/plugins/callback/selective.pytv2_playbook_on_task_start�sc	K`sEd|jjks*|s*|jjdkr(|j�t|_t|jj	dd��ppt|jj	dd��}|jj	dd�|jj	dd�g}djg|D]}|r�|^q��j�}|j
|j|jj	d	t�||jj	d
d�dtd|d
|jj	dd�d|j��d|jkrAx�|jdD]�}d|k}|j	dd�|j	dd�g}djg|D]}|r�|^q��j�}|j
|d|j	d	t�t|j	dd��|j	d
d�dtd|d
|j	dd�d|j��qLWqAnt|_tddd�dS(s#Run when a task finishes correctly.tprint_actioniRttreasont	exceptiont
module_stderrs
RRMRSRTRt
module_stdoutRUtresultsRtitemt.tendN(t_taskttagst_displayt	verbosityR5R"R#Rt_resultRR$R9tstripRYt_hostR0R1(	R'RRTR^RRUtetrR((sF/usr/lib/python2.7/site-packages/ansible/plugins/callback/selective.pyt_print_task_result�s>*
	.
$.
	c	C`s�t�t|_|jd�t|jj��}x�|D]�}|j|�}|dsb|drkd}n|dr~d}nd}dj||d|d|d|d�}tt	||��q9WdS(	s'Display info about playbook statistics.tSTATStfailurestunreachableRRRs6{0}    : ok={1}	changed={2}	failed={3}	unreachable={4}N(
R1R"R&R5tsortedt	processedRt	summarizeRR(R'tstatsthoststhosttsRR((sF/usr/lib/python2.7/site-packages/ansible/plugins/callback/selective.pytv2_playbook_on_stats�s	

	
	%cK`s7|jjdkr3|j�t|_d}ddt|jj�d}djt	|jjd�|t	dd��}|j
jd	d
�p�|j
jdd
�}t|�dkr�|d
j|�7}tdj|d|t|���q3tdj|d|t|���t|j
|d��t|�ndS(sRun when a task is skipped.iixR6iis  * {0}{1}- {2}R
Rtskipped_reasonRatskip_reasoni2s -- {0}s{0} {1}---------RPs{0} {1}iN(RlRmR5R"R#R2RpRQRRRnRR1R?(R'RR^R4RWRXRb((sF/usr/lib/python2.7/site-packages/ansible/plugins/callback/selective.pytv2_runner_on_skipped�s 
	'$cK`s|j|dt|�dS(NRT(RsR"(R'RR^((sF/usr/lib/python2.7/site-packages/ansible/plugins/callback/selective.pytv2_runner_on_okscK`s|j|dt|�dS(NRT(RsR0(R'RR^((sF/usr/lib/python2.7/site-packages/ansible/plugins/callback/selective.pytv2_runner_on_failedscK`s|j|dt|�dS(NRT(RsR0(R'RR^((sF/usr/lib/python2.7/site-packages/ansible/plugins/callback/selective.pytv2_runner_on_unreachablesN(t__name__t
__module__t__doc__tCALLBACK_VERSIONt
CALLBACK_TYPEt
CALLBACK_NAMER$R!R-R5R?RNRYR[R_R"RsR~R�R�R�R�t!v2_playbook_on_handler_task_start(((sF/usr/lib/python2.7/site-packages/ansible/plugins/callback/selective.pyRMs&
			(		*					(t
__future__RRRttypet
__metaclass__t
DOCUMENTATIONtEXAMPLESRItansibleRtCtansible.plugins.callbackRtansible.module_utils._textRtansible.utils.colorRR"RRtCOLOR_OKt
COLOR_CHANGEDtCOLOR_ERRORt
COLOR_SKIPRRRR(((sF/usr/lib/python2.7/site-packages/ansible/plugins/callback/selective.pyt<module>s*	
	

Anon7 - 2022
AnonSec Team