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

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

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

���c�J���ddlmZmZmZeZddlZddlZddlZddl	Z	ddl
Z
ddlmZddl
mZddlmZddlmZmZddlmZddlmZdd	lmZmZdd
lmZmZddlmZddl m!Z!dd
l"m#Z#ddl$m%Z%e%��Z&Gd�de'��Z(dS)�)�absolute_import�division�print_functionN)�MutableSequence)�rmtree)�context)�AnsibleError�AnsibleParserError)�	GalaxyAPI)�
user_agent)�	to_native�to_text)�	yaml_dump�	yaml_load)�LooseVersion)�open_url)�RoleRequirement)�Displayc��eZdZeddg��Zej�dd��ej�dd��fZej�dd��Z	ej�dd��ej�dd��fZ
d	Zdd�Zd�Z
d
�Zed���Zed���Zed���Zed���Zed���Zd�Zd�Zd�Zd�Zed���Zed���Zd
S)�
GalaxyRole�git�hg�metazmain.ymlz	main.yamlz.galaxy_install_infozrequirements.ymlzrequirements.yaml)�defaults�files�handlersr�tasks�	templates�vars�testsNc�<��d�_d�_d�_d�_tjd�_t�d�jz��|�_	|�_
|�_|�_|p|�_
d�_|�_�fd�|jD���_|��|�t&j�t&jj�j����s&t&j�|�j��}no�jD]g}t&j�t&j�|||����r't&j�|�j��}n�h|�_dS�jd�_dS)N�ignore_certszValidate TLS certificates: %sc�Z��g|]'}tj�|�j����(S�)�os�path�join�name)�.0�x�selfs  ��8/usr/lib/python3.11/site-packages/ansible/galaxy/role.py�
<listcomp>z'GalaxyRole.__init__.<locals>.<listcomp>Js+���M�M�M�Q�b�g�l�l�1�d�i�0�0�M�M�M�r)�	_metadata�_metadata_dependencies�
_requirements�
_install_infor�CLIARGS�_validate_certs�display�debug�galaxy�_apir(�version�src�download_url�scm�roles_paths�paths�endswithr%r&r'�sep�	META_MAIN�exists)	r+r7�apir(r:r9r<r&�	meta_mains	`        r,�__init__zGalaxyRole.__init__8sh������&*��#�!���!���#*�?�>�#B�B����
�
�5��8L�L�M�M�M������	���	�����;�$��� ������M�M�M�M�&�:L�M�M�M��
����=�=�����b�g�k�4�9�!E�!E�F�F�
��w�|�|�D�$�)�4�4���"&����I��w�~�~�b�g�l�l�4��y�&I�&I�J�J��!�w�|�|�D�$�)�<�<������D�I�I�I��
�1�
�D�I�I�Ir.c�B�|jr|j�d|j�d�S|jS)zj
        Returns "rolename (version)" if version is not null
        Returns "rolename" otherwise
        z (�))r9r(�r+s r,�__repr__zGalaxyRole.__repr__^s-��
�<�	� $�	�	�	�4�<�<�<�8�8��9�r.c�"�|j|jkS�N)r()r+�others  r,�__eq__zGalaxyRole.__eq__hs���y�E�J�&�&r.c�\�t|jt��s|jjS|jSrK)�
isinstancer8rrCrHs r,rCzGalaxyRole.apiks(���$�)�Y�/�/�	!��9�=� ��y�r.c��|j��|jD]�}|jD]�}tj�||��}tj�|��ru	t|d��5}t|��|_ddd��n#1swxYwYn5#t$r(t�d|jz��YdSwxYwn����|jS)z'
        Returns role metadata
        N�rzUnable to load metadata for %sF)
r/r>rAr%r&r'�isfile�openr�	Exceptionr5�vvvvvr()r+r&rD�	meta_path�fs     r,�metadatazGalaxyRole.metadataqs%��
�>�!��
�

�

��!%��	�	�I� "����T�9� =� =�I��w�~�~�i�0�0��)�!%�i��!5�!5�>��1:�1�����>�>�>�>�>�>�>�>�>�>�>����>�>�>�>���(�)�)�)�#�M�M�*J�T�Y�*V�W�W�W�#(�5�5�5�5�)���������~�s6�B�*B�?B�B�B�B�B�,C	�C	c���|j�/g|_|j�!|j�d��pg|_t|jt��std|�d|j�����|jS)zC
        Returns a list of dependencies from role metadata
        N�dependencies�.Expected role dependencies to be a list. Role z% has meta/main.yml with dependencies )r0rX�getrOrr
rHs r,�metadata_dependenciesz GalaxyRole.metadata_dependencies�s���
�&�.�*,�D�'��}�(�.2�m�.?�.?��.O�.O�.U�SU��+��$�5��G�G�	�$�J��J�J�lp�mH�J�J���
��*�*r.c���|j��tj�|j|j��}tj�|��r�	t
|d��}t|��|_nG#t$r:t�
d|jz��Y|���dSwxYw	|���n#|���wxYw|jS)z+
        Returns role install info
        NrQz)Unable to load Galaxy install info for %sF)
r2r%r&r'�META_INSTALLrRrSrrTr5rUr(�close)r+�	info_pathrWs   r,�install_infozGalaxyRole.install_info�s���
��%�����T�Y��0A�B�B�I��w�~�~�i�(�(�
���Y��,�,�A�)2�1���D�&�&�� �!�!�!��M�M�"M�PT�PY�"Y�Z�Z�Z� ��G�G�I�I�I�I�I�	!����'�
�G�G�I�I�I�I��A�G�G�I�I�I�I�����!�!s*�$A7�6C�7,B;�#C�:B;�;C�C*c�^�|jD]$}tj�|��rdS�%dS)NTF)r>r%r&�isdir)r+r&s  r,�_existszGalaxyRole._exists�s<���J�	�	�D��w�}�}�T�"�"�
��t�t�
��ur.c��t|jtj����d�����}t
j�t
j�|jd����s7tj	t
j�|jd����t
j�|j|j
��}t|d��5}	t||��|_
n#t$rYddd��dSwxYw	ddd��n#1swxYwYdS)z�
        Writes a YAML-formatted file to the role's meta/ directory
        (named .galaxy_install_info) which contains some information
        we can use later for commands like 'list' and 'info'.
        z%c)r9�install_daterzw+NFT)�dictr9�datetime�utcnow�strftimer%r&rBr'�makedirsr_rSrr2rT)r+�inforarWs    r,�_write_galaxy_install_infoz%GalaxyRole._write_galaxy_install_info�sq����L�!�*�1�1�3�3�<�<�T�B�B�
�
�
���w�~�~�b�g�l�l�4�9�f�=�=�>�>�	9��K�����T�Y��7�7�8�8�8��G�L�L���D�,=�>�>�	�
�)�T�
"�
"�	�a�
�%.�t�Q�%7�%7��"�"���
�
�
��		�	�	�	�	�	�	�	�
����#�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	��ts6�9D:�;D�D:�
D*�D:�)D*�*D:�:D>�D>c�b�|jr'	t|j��dS#t$rYnwxYwdS)z�
        Removes the specified role from the roles path.
        There is a sanity check to make sure there's a meta/main.yml file at this
        path so the user doesn't blow away random directories.
        TF)rXrr&rTrHs r,�removezGalaxyRole.remove�sO���=�	�
��t�y�!�!�!��t���
�
�
���
�����us��
,�,c�j�|�r/|j�|j}n-d|vr"d|vrd|d�d|d�d|j�d�}n|j}t�d|z��	t	||jt
���	��}tjd
���}|�	��}|r+|�
|��|�	��}|�+|���|jS#t$r4}t�dt|��z��Yd}~nd}~wwxYwd
S)
zS
        Downloads the archived role to a temp location based on role data
        N�github_user�github_repozhttps://github.com/�/z	/archive/z.tar.gzz- downloading role from %s)�validate_certs�
http_agentF)�deletezfailed to download the file: %s)r;r9r:r5rr4r�tempfile�NamedTemporaryFile�read�writer`r(rT�errorr)r+�	role_data�archive_url�url_file�	temp_file�data�es       r,�fetchzGalaxyRole.fetch�s����	O�� �,�"�/����)�+�+�
��0J�0J�0J�NW�Xe�Nf�Nf�Nf�hq�r�iA�iA�iA�CG�CO�CO�CO�P���"�h���O�O�8�;�F�G�G�G�

O�#�K��@T�ak�am�am�n�n�n��$�7�u�E�E�E�	��}�}�����+��O�O�D�)�)�)�#�=�=�?�?�D��+����!�!�!� �~�%���
O�
O�
O��
�
�@�7�1�:�:�M�N�N�N�N�N�N�N�N�����
O�����us�BC2�2
D0�<*D+�+D0c
���|jr*tjd3dtjdi|j��}�n||j�retj�	|j��r	|j}�nGd|jvr|j}|�
|��}�n |j�|j��}|s%td|j�d|jj�d����|�d��dkr"t �d|jz��|j�d	|d
��}|js�t+|��dkrzd�|D��}	|���n=#t.$r0td
d�d�|D����z���wxYwt3|d��|_n||�dd��r|d|_nXd|_nP|jdkrE|rCt3|j��d�|D��vr#td|j�d|j�d|�d����|D]F}|d|jkrd|vr
|d|_|d|jkrd|vr
|d|_�G|�
|��}ntd���|�r�t �d|z��t9j|��std���t9j|d��}d}|���}|D]�}	|j D]w}
|
|	jvrltj�!tj�!|	j����}|s|}|	}�St+|��t+|��kr|}|	}�x��|std���	tE|�#|����|_$n#tJ$rtd ���wxYw|j&}
|j|
dkr|j|
dd�<t+|
��}tO|
��D�]{\}}||_t �d!|j�d"|j����	tj�(|j��r�tj�)|j��std#���tj�d$d%��std&|jz���|�*��std'|jz���ntj+|j��|D]�}	|	�,��s|	�-��r�t]|	j��}t]|��}|�/|d(d)���0tj1��}g}|D]6}|d*kr.|�2d+��sd,|vr|�3|���7tjj|�|	_|�4|	t]|j������|�5��n]#tl$rP}|j7tnj8kr||d)z
krYd}~��Ntd-|j�d.t]|�������d}~wwxYwt �d/ts|��z��|jr$tj�	|j��sa	tj:|��nK#tltvf$r7}t �d0|�d1t3|������Yd}~nd}~wwxYwd2Sd%S)4N�
keep_scm_metaz://z	- sorry, z was not found on �.�	role_type�APPzP%s is a Container App role, and should only be installed using Ansible Container�versions�idrc�T�g|]%}t|�dd������&S�r(N)rr\�r)�as  r,r-z&GalaxyRole.install.<locals>.<listcomp>s/��)c�)c�)c�PQ�,�q�u�u�V�T�7J�7J�*K�*K�)c�)c�)cr.z�Unable to compare role versions (%s) to determine the most recent version due to incompatible version formats. Please contact the role author to resolve versioning conflicts, or specify an explicit role version to install.z, c��g|]	}|j��
Sr$)�vstring)r)�vs  r,r-z&GalaxyRole.install.<locals>.<listcomp>s��7Z�7Z�7Z�a��	�7Z�7Z�7Zr.����
github_branch�masterc�:�g|]}|�dd����Sr�)r\r�s  r,r-z&GalaxyRole.install.<locals>.<listcomp> s(��Fr�Fr�Fr�_`�q�u�u�V�UY�GZ�GZ�Fr�Fr�Frr.z- the specified version (z) of z2 was not found in the list of available versions (z).r(�sourcer;zNo valid role data foundzinstalling from %sz>the downloaded file does not appear to be a valid tar archive.rQz7this role does not appear to have a meta/main.yml file.z=this role does not appear to have a valid meta/main.yml file.z
- extracting z to z7the specified roles path exists and is not a directory.�forceFzJthe specified role %s appears to already exist. Use --force to replace it.zu%s doesn't appear to contain a role.
  please remove this directory manually if you really want to put the role here.��z..�~�$zCould not update files in z: z- %s was installed successfullyzUnable to remove tmp file (z): Tr$)<r<r�scm_archive_rolerr3�specr:r%r&rRr�rC�lookup_role_by_namer	�
api_serverr\r5�warningr(�fetch_role_relatedr9�len�sort�	TypeErrorr'rr;r6�tarfile�
is_tarfilerS�
getmembersrA�dirnamer�extractfiler/rTr>�	enumeraterBrdrprl�isreg�issymr
�replace�splitr@�
startswith�append�extractrn�OSError�errno�EACCES�str�unlink�IOError)r+�tmp_filer}�
role_versions�loose_versions�role_version�
role_tar_file�	meta_file�members�memberrD�meta_parent_dir�archive_parent_dirr>�	paths_len�idxr&�
n_member_name�n_archive_parent_dir�n_parts�
n_final_parts�n_partr�s                       r,�installzGalaxyRole.install�sj���8�8	;�&�7�t�t�g�o�Ve�Ff�t�jn�js�t�t�H�H�
�X�5	;��w�~�~�d�h�'�'�1
1��8����$�(�"�"� �H�	��:�:�i�0�0��� �H�8�8���B�B�	� �m�&�,�T�X�X�X�W[�W_�Wj�Wj�Wj�'k�l�l�l��=�=��-�-��6�6��O�O�%0�26�)�%<�=�=�=�!%�� ;� ;�J�	�RV�� X� X�
��|�Y�
�=�)�)�A�-�-�)c�)c�Ub�)c�)c�)c���*�/�/�1�1�1�1��(����".�!+�-1�Y�Y�7Z�7Z�>�7Z�7Z�7Z�-[�-[�!\�#�#������(/�~�b�/A�'B�'B����"�����=�=�0�'0��'A����'/�����\�X�-�-�$�Y����)>�)>�Fr�Fr�dq�Fr�Fr�Fr�)r�)r�*�l�JN�JV�JV�JV�JN�JS�JS�JS�JW�JW�JW�,X�Y�Y�Y�
%2�I�I�L�#�F�+�t�|�;�;��L�@X�@X�#/��#9���#�F�+�t�|�;�;��R^�@^�@^�,8��,H��)���:�:�i�0�0����9�:�:�:��^	��M�M�.��9�:�:�:��%�h�/�/�Z
�"�#c�d�d�d� '��X�s� ;� ;�
� �	�'�2�2�4�4��%�
7�
7�F�%)�^�7�7�	�$���3�3�/1�g�o�o�b�g�o�o�f�k�>Z�>Z�.[�.[�O�#,�7�5D� 2�,2�	�	�#&��#7�#7�#�>P�:Q�:Q�#Q�#Q�9H�$6�06�I��7�!�l�&�'`�a�a�a�l�)2�=�3L�3L�Y�3W�3W�)X�)X�����$�l�l�l�*�+j�k�k�k�l�����
���9��a��(�(�!%�	�E�"�1�"�I���J�J�	�!*�5�!1�!1�-k�-k�I�C�� $�D�I��O�O�O�t�y�y�y�$�)�)�$T�U�U�U�*k��7�>�>�$�)�4�4�3�#%�7�=�=���#;�#;�a�&2�3l�&m�&m� m�%,�_�%8�%8��%�%H�%H�a�&2�3�CG�CL�4L�'M�'M�!M�(,�{�{�}�}�!a�*6�8T�VZ�V_�8`�+a�+a�%a�!a��K��	�2�2�2�
'.�T�T�F� &�|�|�~�~�
T������
T�09�&�+�0F�0F�
�7@�AS�7T�7T� 4�*7�*?�*?�@T�VX�Z[�*\�*\�*b�*b�ce�ci�*j�*j��02�
�.5�!E�!E�F�
(.��~�~�f�>O�>O�PS�>T�>T�~�Y\�dj�Yj�Yj�(5�(<�(<�V�(D�(D�(D��.0�g�l�M�.J��� -� 5� 5�f�i��	�>R�>R� S� S� S���7�7�9�9�9����"�k�k�k��7�e�l�2�2�s�Y��]�7J�7J�$�H�H�H�H�*�l�QU�QZ�QZ�QZ�\e�fg�\h�\h�\h�+i�j�j�j�����k������� A�C��I�I� M�N�N�N���h�R�W�^�^�D�H�%=�%=�h�h��	�(�+�+�+�+��#�W�-�h�h�h�����QY�QY�QY�[b�cd�[e�[e�[e�(f�g�g�g�g�g�g�g�g�����h�����t��usO�E,�,:F&�2'O�O4�1G&Y�
Z3�#Z.�'Z.�.Z3�\!�!])�2-]$�$])c�P�t|j|j|j|j���S)z�
        Returns role spec info
        {
           'scm': 'git',
           'src': 'http://git.example.com/repos/repo.git',
           'version': 'v1.0',
           'name': 'repo'
        }
        )r<r:r9r()rhr<r:r9r(rHs r,r�zGalaxyRole.spec�s#�����d�h���4�9�U�U�U�Ur.c�@�|j��g|_|jD]�}tj�|j|��}tj�|��r�	t
|d��}t|��|_n2#t$r%t�
d|jz��YnwxYw|���n#|���wxYwn��t|jt��std|�d|j�����|jS)z+
        Returns role requirements
        NrQz"Unable to load requirements for %sr[z has meta/requirements.yml )r1�META_REQUIREMENTSr%r&r'rRrSrrTr5rUr(r`rOrr
)r+�meta_requirementsrVrWs    r,�requirementszGalaxyRole.requirements�sH��
��%�!#�D��%)�%;�
�
�!��G�L�L���4E�F�F�	��7�>�>�)�,�,�	�"� ��C�0�0��-6�q�\�\��*�*��$�X�X�X��
�
�&J�T�Y�&V�W�W�W�W�W�X�������	�	�	�	�����	�	�	�	�����E�	��$�,�o�>�>�	M�$�&L�VZ�&L�&L�w{�xJ�&L�&L�M�M�
M��!�!s*�$B�C	�,B1�.C	�0B1�1C	�	C)NNNN)�__name__�
__module__�__qualname__�set�SUPPORTED_SCMSr%r&r'rAr_r��	ROLE_DIRSrErIrM�propertyrCrXr]rbrernrpr�r�r�r�r$r.r,rr0s��������S�%���'�'�N�����f�j�1�1�2�7�<�<���3T�3T�U�I��7�<�<��(>�?�?�L�����f�.@�A�A�2�7�<�<�PV�Xk�Cl�Cl�m��`�I�$&�$&�$&�$&�L���'�'�'�����X��
����X��&�+�+��X�+�"�"�"��X�"�$����X�����,
�
�
����<\�\�\�|�
V�
V��X�
V��"�"��X�"�"�"r.r))�
__future__rrr�type�
__metaclass__r�rir%r�rx�collections.abcr�shutilr�ansibler�ansible.errorsr	r
�ansible.galaxy.apir�ansible.galaxy.user_agentr�ansible.module_utils._textr
r� ansible.module_utils.common.yamlrr�#ansible.module_utils.compat.versionr�ansible.module_utils.urlsr�!ansible.playbook.role.requirementr�ansible.utils.displayrr5�objectrr$r.r,�<module>r�s���,C�B�B�B�B�B�B�B�B�B��
���������	�	�	�	���������+�+�+�+�+�+�������������;�;�;�;�;�;�;�;�(�(�(�(�(�(�0�0�0�0�0�0�9�9�9�9�9�9�9�9�A�A�A�A�A�A�A�A�<�<�<�<�<�<�.�.�.�.�.�.�=�=�=�=�=�=�)�)�)�)�)�)�
�'�)�)��G"�G"�G"�G"�G"��G"�G"�G"�G"�G"r.

Youez - 2016 - github.com/yon3zu
LinuXploit