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

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /lib/python3.11/site-packages/ansible/playbook/role/__pycache__/definition.cpython-311.opt-1.pyc
�

���c�%���ddlmZmZmZeZddlZddlmZ	ddl
mZmZddl
mZddlmZmZddlmZddlmZdd	lmZdd
lmZddlmZddlmZdd
lmZddl m!Z!ddl"m#Z#ddl$m%Z%dgZ&e%��Z'Gd�deeee��Z(dS)�)�absolute_import�division�print_functionN)�	constants)�AnsibleError�AnsibleAssertionError)�string_types)�AnsibleBaseYAMLObject�AnsibleMapping)�FieldAttribute)�Base)�CollectionSearch)�Conditional)�Taggable)�Templar)�AnsibleCollectionRef)�_get_collection_role_path)�unfrackpath)�Display�RoleDefinitionc���eZdZed���Zd�fd�	Zedd���Z�fd�Zd�Z	d�Z
d	�Zd
�Zd�Z
dd
�Z�xZS)r�string)�isaNc����tt|�����||_||_||_d|_d|_||_t��|_
||_dS�N)�superr�__init__�_play�_variable_manager�_loader�
_role_path�_role_collection�
_role_basedir�dict�_role_params�_collection_list)�self�play�role_basedir�variable_manager�loader�collection_list�	__class__s      ��E/usr/lib/python3.11/site-packages/ansible/playbook/role/definition.pyrzRoleDefinition.__init__0sf���
�n�d�#�#�,�,�.�.�.���
�!1��������� $���)��� �F�F��� /�����c� �td���)Nznot implemented)r)�datar*r+s   r.�loadzRoleDefinition.loadAs���,�-�-�-r/c���t|t��rd|z}t|t��s8t|t��s#t|t��st���t|t��r(t
t|���|��}||_	t��}t|t��r|j|_|�|��}|�
|��\}}t|t��r$|�|��\}}||z}||_||d<||_|S)Nz%s�role)�
isinstance�intr$r	r
rrr�preprocess_data�_dsr�ansible_pos�_load_role_name�_load_role_path�_split_role_paramsr%r!)r'�ds�new_ds�	role_name�	role_path�new_role_def�role_paramsr-s       �r.r7zRoleDefinition.preprocess_dataEsL����b�#���	����B��"�d�#�#�	*�J�r�<�,H�,H�	*�Q[�\^�`u�Qv�Qv�	*�'�)�)�)��b�$���	A��~�t�,�,�<�<�R�@�@�B����
 �!�!���b�/�0�0�	0�!#��F��
�(�(��,�,�	�!%�!5�!5�i�!@�!@���I�
�b�$���	,�*.�*A�*A�"�*E�*E�'�\�;��l�"�F� +�D��#��v��$����
r/c�z�t|t��r|S|�d|�d����}|rt|t��std|����|jrK|j�|j���}t|j|���}|�	|��}|S)z�
        Returns the role name (either the role: or name: field) from
        the role definition, or (when the role definition is a simple
        string), just that string
        r4�namez)role definitions must contain a role name��obj�r(�r+�	variables)
r5r	�getrr�get_varsrrr �template)r'r=r?�all_vars�templars     r.r:zRoleDefinition._load_role_namers����b�,�'�'�	��I��F�F�6�2�6�6�&�>�>�2�2�	��	T�
�9�l� C� C�	T��J�PR�S�S�S�S��!�	4��-�6�6�D�J�6�G�G�H��T�\�X�F�F�F�G��(�(��3�3�I��r/c��|j�!|j�|j���}nt��}t	|j|���}|�|��}d}|jstj	|��rt||j��}|r|d|_|dd�Stj
�|j���d��g}t jr|�t j��|jr|�|j��|�|j�����|D]d}|�|��}t+tj
�||����}|j�|��r||fcS�et+|��}|j�|��r#tj
�|��}||fS|jpg|z}t1d|�dd	�|����|j�
���)a
        the 'role', as specified in the ds (or as a bare string), can either
        be a simple name or a full path. If it is a full path, we use the
        basename as the role name, otherwise we take the name as-given and
        append it to the default role path
        NrGrH�r�rolesz
the role 'z' was not found in �:rE)rrKrr$rr rLr&r�
is_valid_fqcrrr"�os�path�join�get_basedir�C�DEFAULT_ROLES_PATH�extendr#�appendr�path_exists�basenamerr8)	r'r?rMrN�
role_tuple�role_search_pathsrUr@�searchess	         r.r;zRoleDefinition._load_role_path�sG���!�-��-�6�6�D�J�6�G�G�H�H��v�v�H�����B�B�B���$�$�Y�/�/�	��
�� �	U�$8�$F�y�$Q�$Q�	U�2�9�d�>S�T�T�J��	#�$.�q�M�D�!��a��c�?�"�
�G�L�L���1�1�3�3�X�>�>�
��

��	;��$�$�Q�%9�:�:�:���	9��$�$�T�%7�8�8�8�
	� � ���!9�!9�!;�!;�<�<�<�&�	.�	.�D��#�#�D�)�)�D�#�B�G�L�L��y�$A�$A�B�B�I��|�'�'�	�2�2�
.�!�9�-�-�-�-�
.� �	�*�*�	��<�#�#�I�.�.�	*���(�(��3�3�I��y�)�)��)�/�R�3D�D���l�)�)�)�S�X�X�V^�M_�M_�M_�`�fj�fn�o�o�o�or/c��t��}t��}t|j��}|���D]\}}||vr|||<�|||<�||fS)z�
        Splits any random role params off from the role spec and store
        them in a dictionary of params for parsing later
        )r$�	frozenset�fattributes�items)r'r=�role_defrB�base_attribute_names�key�values       r.r<z!RoleDefinition._split_role_params�su���6�6���f�f��(��)9�:�:���H�H�J�J�
	&�
	&�L�S�%��.�.�.�#(��C� � �!&���
�
��+�&�&r/c�4�|j���Sr)r%�copy�r's r.�get_role_paramszRoleDefinition.get_role_params�s��� �%�%�'�'�'r/c��|jSr)r!rks r.�
get_role_pathzRoleDefinition.get_role_path�s
����r/Tc�j�|r+d�d�|j|jfD����S|jS)N�.c3�K�|]}|�|V��	dSr�)�.0�xs  r.�	<genexpr>z*RoleDefinition.get_name.<locals>.<genexpr>�s'����O�O�!�Q�O�A�O�O�O�O�O�Or/)rVr"r4)r'�include_role_fqcns  r.�get_namezRoleDefinition.get_name�s>���	P��8�8�O�O��(=�t�y�'I�O�O�O�O�O�O��y�r/)NNNNN)NN)T)�__name__�
__module__�__qualname__rr4r�staticmethodr2r7r:r;r<rlrnrw�
__classcell__)r-s@r.rr,s���������>�h�'�'�'�D�0�0�0�0�0�0�"�.�.�.��\�.�+�+�+�+�+�Z���.Bp�Bp�Bp�H'�'�'�4(�(�(�����������r/))�
__future__rrr�type�
__metaclass__rT�ansiblerrX�ansible.errorsrr�ansible.module_utils.sixr	�ansible.parsing.yaml.objectsr
r�ansible.playbook.attributer�ansible.playbook.baser
�!ansible.playbook.collectionsearchr�ansible.playbook.conditionalr�ansible.playbook.taggabler�ansible.templater�ansible.utils.collection_loaderr�2ansible.utils.collection_loader._collection_finderr�ansible.utils.pathr�ansible.utils.displayr�__all__�displayrrrr/r.�<module>r�s���&C�B�B�B�B�B�B�B�B�B��
�	�	�	�	�"�"�"�"�"�"�>�>�>�>�>�>�>�>�1�1�1�1�1�1�N�N�N�N�N�N�N�N�5�5�5�5�5�5�&�&�&�&�&�&�>�>�>�>�>�>�4�4�4�4�4�4�.�.�.�.�.�.�$�$�$�$�$�$�@�@�@�@�@�@�X�X�X�X�X�X�*�*�*�*�*�*�)�)�)�)�)�)��
��
�'�)�)��D�D�D�D�D�T�;��2B�D�D�D�D�Dr/

Youez - 2016 - github.com/yon3zu
LinuXploit