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

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

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

���c�'���ddlmZmZmZeZddlZddlZddlZddl	m
Z
mZddlm
Z
ddlmZddlmZddlmZmZddlmZmZdd	lmZmZdd
lmZed��ZdZda d
ej!��zdd�Z"dej#de��zdd�Z$d�Z%d�Z&dd�Z'dd�Z(d�Z)d�Z*d�Z+d�Z,ere+Z-ne,Z-de-_.dS)�)�absolute_import�division�print_functionN)�MutableMapping�MutableSequence)�dumps)�	constants)�context)�AnsibleError�AnsibleOptionsError)�string_types�PY3)�	to_native�to_text)�parse_kv)�True�False�Nonel�%012x�z%08x�c	���tdz
ad�tdd�tdd�tdd�tdd�dtzdd�g��S)N��-rrr�r)�cur_id�join�node_mac�
random_int���7/usr/lib/python3.11/site-packages/ansible/utils/vars.py�
get_unique_idr#-sc��
�a�K�F��8�8���1��
���2����1�Q�3���1�Q�3��	�6�	�3�B�3�����r!c	��t|t��rt|t��s�g}||fD]W}	|�t|�����&#t$r%|�t|����Y�TwxYwt
d�|jj	|jj	|d|d�����dS)z�
    Internal convenience function to ensure arguments are MutableMappings

    This checks that all arguments are MutableMappings or raises an error

    :raises AnsibleError: if one of the arguments is not a MutableMapping
    zQfailed to combine variables, expected dicts but got a '{0}' and a '{1}': 
{2}
{3}rrN)
�
isinstancer�appendr�	Exceptionrr�format�	__class__�__name__)�a�b�myvars�xs    r"�_validate_mutable_mappingsr/9s���
�q�.�)�)�	
�j��N�.K�.K�	
����Q��	,�	,�A�
,��
�
�e�A�h�h�'�'�'�'���
,�
,�
,��
�
�i��l�l�+�+�+�+�+�
,�����p�w�w�
�K� �!�+�"6��q�	�6�!�9�N�N�
�
�	
�	
�	
s�"A�,B�Bc�x�|s|� tjdkrt||��St||��||z}|S)zV
    Return a copy of dictionaries of variables based on configured hash behavior
    N�merge)�C�DEFAULT_HASH_BEHAVIOUR�
merge_hashr/)r+r,r1�results    r"�combine_varsr6QsM��

���
�!�":�g�"E�"E��!�Q����	#�1�a�(�(�(��Q����
r!T�replacec���|dvrtd���t||��|iks||kr|���S|���}|s|dkr|�|��|S|���D]�\}�||vr�||<�||}t|t��r3t�t��r|rt|�||��||<n�||<�_t|t��rut�t��r`|dkr�||<nS|dkr	|�z||<nD|dkr	�|z||<n5|dkr�fd�|D���z||<n|dkr��fd	�|D��z||<��||<��|S)
z�
    Return a new dictionary result of the merges of y into x,
    so that keys from y take precedence over keys from x.
    (x and y aren't modified)
    )r7�keepr&�prepend�	append_rp�
prepend_rpzzmerge_hash: 'list_merge' argument can only be equal to 'replace', 'keep', 'append', 'prepend', 'append_rp' or 'prepend_rp'r7r&r:r;c���g|]}|�v�|��	Sr r ��.0�z�y_values  �r"�
<listcomp>zmerge_hash.<locals>.<listcomp>�s#���A�A�A����0@�0@�!�0@�0@�0@r!r<c���g|]}|�v�|��	Sr r r>s  �r"rBzmerge_hash.<locals>.<listcomp>�s#���#K�#K�#K�!�!�7�:J�:J�A�:J�:J�:Jr!)	rr/�copy�update�itemsr%rr4r)r.�y�	recursive�
list_merge�key�x_valuerAs      @r"r4r4_s����\�\�\��X�Y�Y�	Y��q�!�$�$�$�
	�B�w�w�!�q�&�&��v�v�x�x��	
�����A�
���y�0�0�	������������	�	�0�0���W��a�<�<��A�c�F���C�&���g�~�.�.�	�:�g�~�3V�3V�	��
!�#�G�W�i��L�L��#��� ��#���
�g��/�/�	�J�w��4X�4X�	��Y�&�&� ��#����x�'�'� �7�*��#����y�(�(� �7�*��#����{�*�*�B�A�A�A�W�A�A�A�G�K��#����|�+�+� �#K�#K�#K�#K�w�#K�#K�#K�K��#��
���#����Hr!c��i}tj�dt����D]�}d}t	|d���}|�|s�|�d��r|�|dd���}nK|ddvrtd|z���|dd	vr|�|��}nt|��}t|t��rt||��}��td
|z���|S)N�
extra_vars�surrogate_or_strict)�errors�@rr)�/�.z0Please prepend extra_vars filename '%s' with '@')�[�{zJInvalid extra vars data supplied. '%s' could not be made into a dictionary)
r
�CLIARGS�get�tupler�
startswith�load_from_filer�loadrr%rr6)�loaderrM�extra_vars_opt�datas    r"�load_extra_varsr^�s.���J�!�/�-�-�l�E�G�G�D�D�E�E���� ��8M�N�N�N���!��!���$�$�T�*�*�
	,��(�(�����);�<�<�D�D�
�A�
�,�
.�
.�%�&X�[i�&i�j�j�j�
�A�
�,�
.�
.��;�;�~�.�.�D�D��N�+�+�D��d�N�+�+�	E�%�j�$�7�7�J�J�%�&r�vD�'D�E�E�
E��r!c	��|�d}d|i}ddddddd	d
d�}|���D].\}}tj�|��}|�||d|z<�/|S)
N�Unknown�ansible_version�
check_mode�	diff_mode�forks�inventory_sources�	skip_tags�limit�run_tags�	verbosity)�check�diffrd�	inventoryrf�subset�tagsriz
ansible_%s)rFr
rUrV)�version�options_vars�attrs�attr�alias�opts      r"�load_options_varsru�s�������%�w�/�L�"� ��-�%���%�
'�
'�E��{�{�}�}�5�5���e��o�!�!�$�'�'���?�14�L���-�.���r!c���t|t��sdS	|�d��n#t$rYdSwxYw|���sdStj|��rdSdS)NF�asciiT)r%r
�encode�UnicodeEncodeError�isidentifier�keyword�	iskeyword��idents r"�_isidentifier_PY3r�s����e�\�*�*���u��	���W�����������u�u������������u��������u��4s�/�
=�=c��t|t��sdS|sdStj�|��rdStj|��s	|tvrdSdS)NFT)r%r
r2�INVALID_VARIABLE_NAMES�searchr{r|�ADDITIONAL_PY2_KEYWORDSr}s r"�_isidentifier_PY2r��sl���e�\�*�*���u����u���&�&�u�-�-���u�������5�,C�#C�#C��u��4r!a.Determine if string is valid identifier.

The purpose of this function is to be used to validate any variables created in
a play to be valid Python identifiers and to not conflict with Python keywords
to prevent unexpected behavior. Since Python 2 and Python 3 differ in what
a valid identifier is, this function unifies the validation so playbooks are
portable between the two. The following changes were made:

    * disallow non-ascii characters (Python 3 allows for them as opposed to Python 2)
    * True, False and None are reserved keywords (these are reserved keywords
      on Python 3 as opposed to Python 2)

:arg ident: A text string of identifier to check. Note: It is callers
    responsibility to convert ident to text if it is not already.

Originally posted at http://stackoverflow.com/a/29586366
)N)Tr7)/�
__future__rrr�type�
__metaclass__r{�random�uuid�collections.abcrr�jsonr�ansibler	r2r
�ansible.errorsrr�ansible.module_utils.sixr
r�ansible.module_utils._textrr�ansible.parsing.splitterr�	frozensetr��_MAXSIZEr�getnoder�randintrr#r/r6r4r^rurr�rz�__doc__r r!r"�<module>r�s���&C�B�B�B�B�B�B�B�B�B��
�����
�
�
�
�����;�;�;�;�;�;�;�;�������"�"�"�"�"�"�������<�<�<�<�<�<�<�<�6�6�6�6�6�6�6�6�9�9�9�9�9�9�9�9�-�-�-�-�-�-�$�)�$=�>�>����	
���l�d�l�n�n�$�c�r�c�*���~�v�~�a��2�2�2�B�Q�B�
7�
�	�	�	�
�
�
�0����U
�U
�U
�U
�p���8���,���,
�
�
� �%�$�L�L�$�L�����r!

Youez - 2016 - github.com/yon3zu
LinuXploit