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/playbook/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /lib/python3.11/site-packages/ansible/playbook/__pycache__/task.cpython-311.pyc
�

���c�M��F�ddlmZmZmZeZddlmZddl	m
Z
mZmZm
Z
ddlmZddlmZddlmZddlmZmZddlmZdd	lmZmZdd
lmZddlmZddl m!Z!dd
l"m#Z#ddl$m%Z%ddl&m'Z'ddl(m)Z)ddl*m+Z+ddl,m-Z-ddl.m/Z/dgZ0e-��Z1Gd�dee#e)e!��Z2dS)�)�absolute_import�division�print_function)�	constants)�AnsibleError�AnsibleParserError�AnsibleUndefinedVariable�AnsibleAssertionError)�	to_native)�string_types)�ModuleArgsParser)�AnsibleBaseYAMLObject�AnsibleMapping)�
lookup_loader)�FieldAttribute�NonInheritableFieldAttribute)�Base)�Block)�CollectionSearch)�Conditional)�LoopControl)�Role)�Taggable)�AnsibleCollectionConfig)�Display)�Sentinel�Taskc���eZdZdZede���Zed���Zeddd�	��Zed
e	���Z
edd���Zed���Zed���Z
ed
e	���Ze��Zed
ee���Zed
���Zedej���Zedd���Zedd���Zed
e	���Zedd���Zd/�fd�	Zd0d�Zd�Zed1d���Zd�Z d�Z!�fd�Z"d�Z#�fd�Z$d�Z%d�Z&�fd�Z'd �Z(d!�Z)d"�Z*d#�Z+d$�Z,d%�Z-d&�Z.d2�fd(�	Z/�fd)�Z0�fd*�Z1d+�Z2d3d,�Z3d-�Z4d.�Z5�xZ6S)4rz�
    A task is a language feature that represents a call to a module, with given arguments and other parameters.
    A handler is a subclass of a task.

    Usage:

       Task.load(datastructure) -> Task
       Task.something(...)
    �dict)�isa�default�string)r �intr�async)r r!�alias�list��bool�class)r �
class_typer!T)r �static�)r �privateNc���||_d|_d|_d|_|r||_n||_t	t
|�����dS)zQ constructors a task, without the Task.load classmethod, it will be pretty blank NF)�_role�_parent�implicit�resolved_action�superr�__init__)�self�block�role�task_include�	__class__s    ��:/usr/lib/python3.11/site-packages/ansible/playbook/task.pyr4z
Task.__init__Ys\�����
������
�#����	!�'�D�L�L� �D�L�
�d�D���"�"�$�$�$�$�$�c���|jr|j�|���}|jr|jr|�d|j��S|jr|jS|jr|�d|j��S|j�S)z return the name of the task )�include_role_fqcnz : )r/�get_name�name�action)r5r=�	role_names   r:r>z
Task.get_namehs����:�	Q��
�+�+�>O�+�P�P�I��:�	-�$�)�	-� )�	�	�4�9�9�5�5�
�Y�	-��9���z�
-�$-�I�I�t�{�{�;�;�#�{�{�,r;c��|�dSt|t��r|St|t��rSd}|���D]&\}}|�d��r�||�d|�d�z}�'|���}|SdS)N��_�=� )�
isinstancerr�items�
startswith�strip)r5�ds�buf�k�vs     r:�	_merge_kvzTask._merge_kvxs���
�:��2�
��L�
)�
)�		��I�
��D�
!�
!�	��C��(�(�*�*�
.�
.���A��<�<��$�$�������1�1�1�-�-����)�)�+�+�C��J�	�	r;c�V�t|||���}|�|||���S)N)r6r7r8)�variable_manager�loader)r�	load_data)�datar6r7r8rQrR�ts       r:�loadz	Task.load�s/���u�4�l�C�C�C���{�{�4�2B�6�{�R�R�Rr;c��|���tjvrd|jdzSd|���zS)z5 returns a human readable representation of the task zTASK: meta (%s)�_raw_paramszTASK: %s)r>�C�_ACTION_META�args�r5s r:�__repr__z
Task.__repr__�s<���=�=�?�?�a�n�,�,�$�t�y��'?�?�?���
�
���/�/r;c���|�d��}|�d���|�d���td|z|����|�td|z|����||d<||d<dS)z2 take a lookup plugin name and store it correctly �with_�loopN�	loop_withzduplicate loop in task: %s��objz&you must specify a value when using %s)�removeprefix�getr)r5rK�new_dsrMrN�	loop_names      r:�_preprocess_with_loopzTask._preprocess_with_loop�s����N�N�7�+�+�	��:�:�f���)�V�Z�Z��-D�-D�-P��;�i�G�R�P�P�P�P��9��G�!�K�QS�T�T�T�T�'��{����v���r;c���t|t��s"td|�dt|�������t	��}t|t
��r|j|_tj}|�	d��}|�|j
}n0|�d|j�	d��|d��}|r'|j
s |r||vr|�d|��n|g}|rd|vrd|vr|�d��|r||d<t!||���}	|���\}}}|j|_n9#t&$r,}	|	jr�t't+|	��||	�	���d}	~	wwxYw|t,jvrGd
|vrC|�	dd��dkrt1d
|����|�d
��|d<||d<||d<||d<d|vr-|�d|�	d����|d<nt��|d<|���D]�\}
}|
dvs|
|ks|
dkr�|
�d��r5|
�d��t<vr|�|||
|���`t,j s	|
|jvr|||
<�{tB�"d|
z����tGtH|���%|��S)zg
        tasks are especially complex arguments so need pre-processing.
        keep it short.
        zds (z) should be a dict but was a �collectionsNrzansible.builtinzansible.legacy)�task_ds�collection_list)rc�orig_exc�cmdrXrCz{The 'cmd' argument cannot be used when other raw parameters are specified. Please put everything in one or the other place.rbr@r[�delegate_to�vars)r@�local_actionr[ro�shellr_zIgnoring invalid attribute: %s)&rGrr
�typerr�ansible_posr�default_collectionrerj�get_validated_value�fattributesr/�insert�appendr
�parser2rrcrrY�_ACTION_HAS_CMDr�pop�
_load_varsrHrIrdrrh�INVALID_TASK_ATTRIBUTE_FAILED�display�warningr3r�preprocess_data)
r5rKrfru�collections_list�args_parserr@r[ro�erMrNr9s
            �r:r�zTask.preprocess_data�s�����"�d�#�#�	b�'�'�SU�SU�SU�W[�\^�W_�W_�W_�(`�a�a�a�
 �!�!���b�/�0�0�	0�!#��F��5�G���6�6�-�0�0���#�#�/��� $�7�7�
�t�GW�G[�G[�\i�Gj�Gj�l|�C� D� D���	8�d�j�	8��
8�%�-=�=�=�$�+�+�A�/A�B�B�B��$6�#7� ��	6� 1�9I� I� I�N^�fv�Nv�Nv��#�#�$4�5�5�5��	1� 0�B�}��
'�r�CS�T�T�T��
	?�*5�*;�*;�*=�*=�'�V�T�;�$/�#>�D� � ��"�	G�	G�	G��u�
��$�Y�q�\�\�r�A�F�F�F�F�����
	G�����Q�&�&�&���}�}��8�8�M�2�.�.�"�4�4�&�([�`b�d�d�d�d�&*�h�h�u�o�o��]�#�!��x����v�� +��}��
�R�<�<�"�_�_�T�2�6�6�&�>�>�B�B�F�6�N�N�!�V�V�F�6�N��h�h�j�j�
	F�
	F�F�Q���E�E�E��f���XY�]d�Xd�Xd�����g�&�&�
F�1�>�>�'�+B�+B�m�+S�+S��*�*�2�v�q�!�<�<�<�<��0�
F�A��9I�4I�4I���q�	�	���� @�1� D�E�E�E�E��T�4� � �0�0��8�8�8s�$E	�	
E?�'E:�:E?c��t|t��std|����tj||j|j���S)Nz|the `loop_control` value must be specified as a dictionary and cannot be a variable itself (though it can contain variables)rb)rTrQrR)rGrrrrV�_variable_manager�_loader)r5�attrrKs   r:�_load_loop_controlzTask._load_loop_control�sU���"�d�#�#�	�$�I�����
���R�$�:P�Y]�Ye�f�f�f�fr;c���	tt|���|��dS#t$r}|xjdz
c_|�d}~wwxYw)Nzb
This error can be suppressed as a warning using the "invalid_task_attribute_failed" configuration)r3r�_validate_attributesr�message)r5rKr�r9s   �r:r�zTask._validate_attributessa���	��$����2�2�2�6�6�6�6�6��!�	�	�	�
�I�I�~�~�I�I��G�����	���s�(-�
A�A	�	Ac�X�t|t��st|||g��dSdS�N�rGr&�setattr�r5r�r?�values    r:�_validate_changed_whenzTask._validate_changed_when�8���%��&�&�	)��D�$���(�(�(�(�(�	)�	)r;c�X�t|t��st|||g��dSdSr�r�r�s    r:�_validate_failed_whenzTask._validate_failed_whenr�r;c���|jr|j�|��tjr	t	t
|���|��dS)z�
        Override of base class post_validate, to also do final validation on
        the block and task include (if any) to which this task belongs.
        N)r0�
post_validaterrur3r)r5�templarr9s  �r:r�zTask.post_validatesW����<�	0��L�&�&�w�/�/�/�"�5�	��
�d�D���'�'��0�0�0�0�0r;c��|S)z�
        Override post validation for the loop field, which is templated
        specially in the TaskExecutor class when evaluating loops.
        ��r5r�r�r�s    r:�_post_validate_loopzTask._post_validate_loop%�	��
�r;c������i�|����fd�}t|t��r�|D]~}t|t��r|D]}||||����/��|d���}t|t��r�|z��at�d|z���nRt|t��r&t���|D]}||||���n��|d�����S)zu
        Override post validation of vars on the play, as we don't want to
        template these too early.
        Nc����	��|d����|<dS#t$r6}t|��}�jtjvrd|vsd|vrYd}~dS�d}~wwxYw)NF��convert_barezansible_facts.env�ansible_env)�templater	rr@rY�_ACTION_FACT_GATHERING)rMrNr��error�envr5r�s    ���r:�
_parse_env_kvz6Task._post_validate_environment.<locals>._parse_env_kv4s�����$�-�-�a�e�-�D�D�C��F�F�F��/����%�a�L�L�E��{�a�&>�>�>�CV�Z_�C_�C_�cp�ty�cy�cy���������������s��
A�*A�A�AFr�z/could not parse environment value, skipping: %s)rGr&rr�rr�)	r5r�r�r�r��env_itemrM�isdictr�s	`  `    @r:�_post_validate_environmentzTask._post_validate_environment,s_�����
����
�
�
�
�
�
�
��%��&�&�
B� %�	g�	g�H�!�(�D�1�1�g�!)�:�:�A�)�M�!�X�a�[�9�9�9�9�:�")�!1�!1�(��!1�!O�!O��%�f�d�3�3�g��6�M�C�C�#�O�O�,]�`e�,e�f�f�f�f�	g��E�4�(�(�
B��f�f�� %�=�=�H�!�M�(�E�(�O�<�<�<�<�=��&�&�u�5�&�A�A���
r;c��|S)z�
        changed_when is evaluated after the execution of the task is complete,
        and should not be templated during the regular post_validate step.
        r�r�s    r:�_post_validate_changed_whenz Task._post_validate_changed_whenUr�r;c��|S)z�
        failed_when is evaluated after the execution of the task is complete,
        and should not be templated during the regular post_validate step.
        r�r�s    r:�_post_validate_failed_whenzTask._post_validate_failed_when\r�r;c��|S)z�
        until is evaluated after the execution of the task is complete,
        and should not be templated during the regular post_validate step.
        r�r�s    r:�_post_validate_untilzTask._post_validate_untilcr�r;c��t��}|jr||j���z}||jz}d|vr|d=d|vr|d=|S)N�tags�when)rr0�get_varsrp�r5�all_varss  r:r�z
Task.get_varsjsd���6�6���<�	0����-�-�/�/�/�H��D�I����X����� ��X����� ��r;c��t��}|jr||j���z}|jtjvr
||jz}|Sr�)rr0�get_include_paramsr@rY�_ACTION_ALL_INCLUDESrpr�s  r:r�zTask.get_include_paramsxsN���6�6���<�	:����7�7�9�9�9�H��;�!�0�0�0���	�!�H��r;Fc�2��tt|�����}d|_|jr"|s |j�|���|_d|_|jr|j|_|j|_|j|_|j|_|S)N)�
exclude_tasks)r3r�copyr0r/r1r2�_uuid)r5�exclude_parentr��new_mer9s    �r:r�z	Task.copy�s�����t�T�"�"�'�'�)�)������<�	L��	L�!�\�.�.�]�.�K�K�F�N�����:�	&��:�F�L��-���!%�!5����z����
r;c�N��tt|�����}|jsu|jsn|jr0|j���|d<|jjj|d<|jr|j���|d<|j	|d<|j
|d<|S)N�parent�parent_typer7r1r2)r3r�	serialize�	_squashed�
_finalizedr0r9�__name__r/r1r2)r5rTr9s  �r:r�zTask.serialize�s�����T�4� � �*�*�,�,���~�		;�d�o�		;��|�
F�!%��!7�!7�!9�!9��X��&*�l�&<�&E��]�#��z�
6�#�z�3�3�5�5��V��#�}�D���&*�&:�D�"�#��r;c�f��ddlm}ddlm}|�dd��}|rj|�d��}|dkrt��}n!|dkr|��}n|dkr
|��}|�|��||_|d=|�d	��}|r-t��}|�|��||_	|d	=|�d
d��|_
|�d��|_tt|���|��dS)
Nr��TaskInclude)�HandlerTaskIncluder�r�rr�r�r7r1Fr2)�ansible.playbook.task_includer��%ansible.playbook.handler_task_includer�rer�deserializer0rr/r1r2r3r)
r5rTr�r��parent_datar��p�	role_data�rr9s
         �r:r�zTask.deserialize�sM���	>�=�=�=�=�=�L�L�L�L�L�L��h�h�x��.�.���
	��(�(�=�1�1�K��g�%�%��G�G����
�-�-��K�M�M���� 4�4�4�&�&�(�(��
�M�M�+�&�&�&��D�L��X���H�H�V�$�$�	��	����A�
�M�M�)�$�$�$��D�J��V������U�3�3��
�#�x�x�(9�:�:���
�d�D���%�%�d�+�+�+�+�+r;c�Z�||_|jr|j�|��dSdS)z�
        Sets the loader on this object and recursively on parent, child objects.
        This is used primarily after the Task has been serialized/deserialized, which
        does not preserve the loader.
        N)r�r0�
set_loader)r5rRs  r:r�zTask.set_loader�s;������<�	,��L�#�#�F�+�+�+�+�+�	,�	,r;c��|j|}|j}|j}	|rt}nt	|d|��t��}t	|jdd��r|j}n|jj}|r}|tus|rrt	|dd��ra|dkr&t
|d��r|�|��}nt	|d|��t��}|r|�|||��}n|}n#t$rYnwxYw|S)zZ
        Generic logic to get the attribute or parent attribute for a task value.
        rD�statically_loadedTrp�_get_parent_attribute)
rw�extend�prependr�getattrr0�hasattrr��
_extend_value�KeyError)	r5r��omit�fattrr�r�r�r0�parent_values	         r:r�zTask._get_parent_attribute�s4��� ��&������-��	��
<� �����j�$�j�j�(�;�;���t�|�%8�$�?�?�
/��,����,�.���
-�E�X�-�-��-��7�$7��>�>�
-��v�~�~�'�'�;R�*S�*S�~�'.�'D�'D�T�'J�'J���'.�w�
�D�
�
�H�'M�'M���-� $� 2� 2�5�,�� P� P��� ,�����	�	�	��D�	�����s�CC*�*
C7�6C7c�F�|jr|j���SdS)NT)r0�all_parents_staticr\s r:r�zTask.all_parents_static�s%���<�	5��<�2�2�4�4�4��tr;c��ddlm}|jr5t|j|��r|jS|j���SdS)Nrr�)r�r�r0rG�get_first_parent_include)r5r�s  r:r�zTask.get_first_parent_include�sS��=�=�=�=�=�=��<�	;��$�,��4�4�
$��|�#��<�8�8�:�:�:��tr;)NNN)T)NNNNN)FF)F)7r��
__module__�__qualname__�__doc__rrr[r@�	async_valr&�changed_when�delayro�delegate_facts�failed_whenr`rr�loop_control�notifyrY�DEFAULT_POLL_INTERVAL�poll�register�retries�untilrar4r>rO�staticmethodrVr]rhr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r��
__classcell__)r9s@r:rr.sh���������*�>�f�d�3�3�3�D�
�^��
)�
)�
)�F���5�!�7�C�C�C�I�!�>�f�d�;�;�;�L��N�u�a�0�0�0�E� �.�X�.�.�.�K�#�^��/�/�/�N� �.�V�T�:�:�:�K��>���D�/�/�G��]h�i�i�i�L�
�^��
'�
'�
'�F��>�e�Q�-D�E�E�E�D��~�(�4�8�8�8�H��n���2�2�2�G��N�v�t�4�4�4�E�-�,��4�H�H�H�I�
%�
%�
%�
%�
%�
%�-�-�-�-� ����S�S�S��\�S�0�0�0�	�	�	�]9�]9�]9�]9�]9�~g�g�g������)�)�)�)�)�)�1�1�1�1�1����'�'�'�R���������������������"����� ,�,�,�,�,�>
,�
,�
,�&�&�&�&�P���
������r;N)3�
__future__rrrrs�
__metaclass__�ansiblerrY�ansible.errorsrrr	r
�ansible.module_utils._textr�ansible.module_utils.sixr�ansible.parsing.mod_argsr
�ansible.parsing.yaml.objectsrr�ansible.plugins.loaderr�ansible.playbook.attributerr�ansible.playbook.baser�ansible.playbook.blockr�!ansible.playbook.collectionsearchr�ansible.playbook.conditionalr�ansible.playbook.loop_controlr�ansible.playbook.roler�ansible.playbook.taggabler�ansible.utils.collection_loaderr�ansible.utils.displayr�ansible.utils.sentinelr�__all__rrr�r;r:�<module>rs���&C�B�B�B�B�B�B�B�B�B��
�"�"�"�"�"�"�l�l�l�l�l�l�l�l�l�l�l�l�0�0�0�0�0�0�1�1�1�1�1�1�5�5�5�5�5�5�N�N�N�N�N�N�N�N�0�0�0�0�0�0�S�S�S�S�S�S�S�S�&�&�&�&�&�&�(�(�(�(�(�(�>�>�>�>�>�>�4�4�4�4�4�4�5�5�5�5�5�5�&�&�&�&�&�&�.�.�.�.�.�.�C�C�C�C�C�C�)�)�)�)�)�)�+�+�+�+�+�+��(��
�'�)�)��Q�Q�Q�Q�Q�4��h�(8�Q�Q�Q�Q�Qr;

Youez - 2016 - github.com/yon3zu
LinuXploit