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

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

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

���cR����ddlmZmZmZeZddlZddlZddlm	Z	ddl
mZmZm
Z
ddlmZddlmZddlmZddlmZmZmZmZmZmZdd	lmZdd
lmZm Z ddl!m"Z"ddl#m$Z$m%Z%dd
l&m'Z'ddl(m)Z)ddl*m+Z+ddl,m-Z-ddl.m/Z/ddl0m1Z1m2Z2m3Z3ddl4m5Z5ddl6m7Z7m8Z8ddl9m:Z:m;Z;e-��Z<d�Z=Gd�d��Z>Gd�de��Z?dS)�)�absolute_import�division�print_functionN)�defaultdict)�Mapping�MutableMapping�Sequence)�sha1)�UndefinedError)�	constants)�AnsibleError�AnsibleParserError�AnsibleUndefinedVariable�AnsibleFileNotFound�AnsibleAssertionError�AnsibleTemplateError)�Host)�sort_groups�get_group_vars)�to_text)�	text_type�string_types)�
lookup_loader)�	FactCache)�Templar)�Display)�listify_lookup_plugin_terms)�combine_vars�load_extra_vars�load_options_vars)�wrap_var)�namespace_facts�clean_facts)�get_vars_from_inventory_sources�get_vars_from_pathc	��|�dSt|t��s|g}n|}|D]:}t|t��s#td|�dt	|���d�����;|S)z�
    Ensures that vars contained in the parameter passed in are
    returned as a list of dictionaries, to ensure for instance
    that vars loaded from a file conform to an expected state.
    Nz^variable files must contain either a dictionary of variables, or a list of dictionaries. Got: z (�))�
isinstance�listrr
�type)�a�data�items   �9/usr/lib/python3.11/site-packages/ansible/vars/manager.py�preprocess_varsr/2s���	�y��t�
��4�
 �
 ���s������W�W���$��/�/�	W��,�KL�KL�KL�NR�ST�NU�NU�NU�NU� V�W�W�
W�	W��K�c��eZdZegd���Zdd�Zd�Zd�Zed���Z	d�Z
		dd
�Zdd�Zd�Z
d
�Zd�Zd�Zd�ZdS)�VariableManager)�plugins_by_group�groups_plugins_play�groups_plugins_inventory�groups_inventory�all_plugins_play�all_plugins_inventory�
all_inventoryNc��tt��|_tt��|_tt��|_tt��|_tt��|_||_||_d|_	dttjd�����
��z|_t|��|_|j�dd��}t%|dup|��|_t)|j���|_	t+��|_dS#t.$r9}t0�t5|����i|_Yd}~dSd}~wwxYw)N�__omit_place_holder__%s�@�basedirF��loader)r�dict�_nonpersistent_fact_cache�_vars_cache�_extra_vars�_host_vars_files�_group_vars_files�
_inventory�_loader�	_hostvarsr
�os�urandom�	hexdigest�_omit_tokenr �
_options_vars�get�bool�safe_basedirrr�_fact_cacher
�display�warningr)�selfr?�	inventory�version_infor=�es      r.�__init__zVariableManager.__init__LsU��)4�T�):�):��&�&�t�,�,���&�t�,�,��� +�D� 1� 1���!,�T�!2�!2���#���������4�t�B�J�r�N�N�7K�7K�7U�7U�7W�7W�W���.�|�<�<����$�(�(��E�:�:�� ��E�!1�!<�W�=�=���+�$�,�?�?�?���	"�(�{�{�D������	"�	"�	"�
�O�O�G�A�J�J�'�'�'�!�D������������		"���s�0E�
F�.F�Fc��t|j|j|j|j|j|j|j|j|j	|j
��
�
}|S)N)
�
fact_cache�
np_fact_cache�
vars_cache�
extra_vars�host_vars_files�group_vars_files�
omit_token�options_varsrUrP)r@rQrArBrCrDrErLrMrFrP�rTr,s  r.�__getstate__zVariableManager.__getstate__jsX����'��8��'��'� �1�!�3��'��+��o��*�
�
�
���r0c	��|�dtt����|_|�dtt����|_|�dtt����|_|�dt����|_|�dtt����|_|�dtt����|_|�ddttjd	�������z��|_
|�d
d��|_|�dt����|_|�dd
��|_d|_d|_dS)NrZr[r\r]r^r_r`r;r<rUrarPF)rNrr@rQrArBrCrDrEr
rIrJrKrLrFrMrPrGrHrbs  r.�__setstate__zVariableManager.__setstate__ysH���8�8�L�+�d�2C�2C�D�D���)-���/�;�t�CT�CT�)U�)U��&��8�8�L�+�d�2C�2C�D�D����8�8�L�$�&�&�9�9��� $���):�K��<M�<M� N� N���!%���*<�k�$�>O�>O�!P�!P����8�8�L�2K�d�SU�S]�^`�Sa�Sa�Nb�Nb�Nl�Nl�Nn�Nn�2n�o�o����(�(�;��5�5���!�X�X�n�d�f�f�=�=��� �H�H�^�U�;�;����������r0c��|jS�N)rC�rTs r.r]zVariableManager.extra_vars�s����r0c��||_dSrg)rF)rTrUs  r.�
set_inventoryzVariableManager.set_inventory�s
��#����r0T�taskc

���	�"�#�$�%�&�'�(�t�d��t��}
��|||||||���}i�%�%fd��"g�'�jr�j���g�'|r>|���D])}�"|
|���d|j	z��}
�*|r�tjdkr|����'nVtjdvr|���dg�'n,tjdkrtd	tjz���|j�Z|s|jtjvrE�"|
|j�|������d|jj	z��}
|�r�jj�d���&t+d�|���D�����(�fd
�}
��	fd��#�"�'��	fd��$�&fd�}�#�&fd�}�$�&fd�}�(fd�}�#�(fd�}�$�(fd�}�"�#�$�(fd�}tjD]x}|�jvrPt�d|�d|j	�����"|
t3��|��d|z��}
�[t�d|z���y�"|
|���d|z��}
�"|
�#|g��d|z��}
�"|
�$|g��d|z��}
	t9�j�|j	i����}|
t=|��z}
tjr(�"|
t9tA|����d��}
n0�"|
t9d|�di��i��d��}
n#tB$rYnwxYw|�r��"|
|���d ��}
|�"��}	|D�]�}tG|
�j$��}tG||��}tK�j|�!��}|}tM|tN��s|g}	|D]�}|�(|��}tM|tR��std"|z���	|���}�j�*|d#|��x}}tW�j�,|d$d%�&����} | �| D]}!�"|
|!d'|z��}
�n0#tZ$rY��t\$r�wxYw|r|rt[d(|z���n�#t^t`f$rx|�U�j�|j	t�����d)��r|�tad*|z|�+���t�1d,|z��Y���wxYwt�1d-|z�����n0#td$r#t]d.|�d/tg|�������wxYwtj4s@|���D]+}�"|
|�d%�0��d1|j	z��}
�,|rl|jrF�"|
|j�|���d%�0��d1|jj	z��}
�"|
|���d2��}
|r{�"|
�j5�|�6��t����d3��}
�"|
�j7�|j	t����d4��}
|rj|jrD�"|
|j�8|�����d5|jj	z��}
�"|
|�9��d6��}
�"|
�j$d7��}
�"|
|d8��}
|r
|j:|
d9<|s|r|
�;��|
d#<|r+|r)|j<�"|r ��=|||
��\|
d:<|
d;<t�d<��tj>rt~�@|
�%��S|
S)=an
        Returns the variables, with optional "context" given via the parameters
        for the play, host, and task (which could possibly result in different
        sets of variables being returned due to the additional context).

        The order of precedence is:
        - play->roles->get_default_vars (if there is a play context)
        - group_vars_files[host] (if there is a host context)
        - host_vars_files[host] (if there is a host context)
        - host->get_vars (if there is a host context)
        - fact_cache[host] (if there is a host context)
        - play vars (if there is a play context)
        - play vars_files (if there's no host context, ignore
          file names that cannot be templated)
        - task->get_vars (if there is a task context)
        - vars_cache[host] (if there is a host context)
        - extra vars

        ``_hosts`` and ``_hosts_all`` should be considered private args, with only internal trusted callers relying
        on the functionality they provide. These arguments may be removed at a later date without a deprecation
        period and without warning.
        zin VariableManager get_vars())�play�hostrk�include_hostvars�include_delegate_to�_hosts�
_hosts_allc�P��tjr
|D]}|�|<�t||��S)z�
            Wrapper function to update var sources dict and call combine_vars()

            See notes in the VarsWithSources docstring for caveats and limitations of the source tracking
            )�C�
DEFAULT_DEBUGr)r,�new_data�source�key�
_vars_sourcess    �r.�_combine_and_trackz4VariableManager.get_vars.<locals>._combine_and_track�s;�����
0�#�0�0�C�)/�M�#�&�&���h�/�/�/r0zrole '%s' defaults�all)�bottom�playbook_dirr�topzUnknown playbook vars logic: %sN)�	dep_chainc�$�g|]
}|jdv�|��S))r{��name)�.0�gs  r.�
<listcomp>z,VariableManager.get_vars.<locals>.<listcomp>�s%��&]�&]�&]�Q�q�v�U\�G\�G\�q�G\�G\�G\r0c����i}	|��j||��}n�#t$r�	|D]R}t|t��r||�|j��z}�5||�|j��z}�Sn\#t$rOt|d��rtd|j
�d|j�����td|j
�d|j�����wxYwYnwxYw|S)N�runzCannot use v1 type vars plugin z from zInvalid vars plugin )�get_varsrG�AttributeErrorr(r�
get_host_varsr�r�hasattrr
�
_load_name�_original_path)�plugin�path�entitiesr,�entityrTs     �r.�_get_plugin_varsz2VariableManager.get_vars.<locals>._get_plugin_vars�sU�����
~�!�?�?�4�<��x�H�H�D�D��%�~�~�~�
~�&.�K�K�F�)�&�$�7�7�K� $��(<�(<�V�[�(I�(I� I��� $��(=�(=�f�k�(J�(J� J���	K��
*�~�~�~�"�6�5�1�1�~�".�,�^d�^o�^o�^o�qw�rG�rG�0H�#I�#I�I�".�,�SY�Sd�Sd�Sd�fl�f{�f{�/|�"}�"}�}�	~����K�K�~�����s(�"�
C"�AB�C"�AC�C"�!C"c�F��t�j�jj|���S)z) merges all entities by inventory source )r$rGrF�_sources)r�rT�stages ��r.�_plugins_inventoryz4VariableManager.get_vars.<locals>._plugins_inventory�s ���6�t�|�T�_�E]�_g�in�o�o�or0c
�`��i}�D]'}�|t�j||���d|z��}�(|S)z& merges all entities adjacent to play z	path '%s')r%rG)r�r,r�rz�basedirsrTr�s   ����r.�
_plugins_playz/VariableManager.get_vars.<locals>._plugins_play�sU�����$�A�A�D�-�-�d�4F�t�|�UY�[c�ej�4k�4k�mx�{�m�A�A�D�D��r0c�,������Srg)r�)�	all_groups�r.r9z/VariableManager.get_vars.<locals>.all_inventorys��� �)�)�+�+�+r0c�����g��Srg�)r�r�s��r.r8z7VariableManager.get_vars.<locals>.all_plugins_inventorys���)�)�9�+�6�6�6r0c�����g��Srgr�)r�r�s��r.r7z2VariableManager.get_vars.<locals>.all_plugins_plays���$�}�i�[�1�1�1r0c�"��t���S)z  gets group vars from inventory )r)�host_groupss�r.r6z2VariableManager.get_vars.<locals>.groups_inventorys���%�k�2�2�2r0c�������S)z/ gets plugin sources from inventory for groups r�)r�r�s��r.r5z:VariableManager.get_vars.<locals>.groups_plugins_inventorys���)�)�+�6�6�6r0c�������S)z* gets plugin sources from play for groups r�)r�r�s��r.r4z5VariableManager.get_vars.<locals>.groups_plugins_plays���$�}�[�1�1�1r0c���i}�D]F}�||�|��d|z��||<�||�|��d|z��||<�G|S)z�
                    merges all plugin sources by group,
                    This should be used instead, NOT in combination with the other groups_plugins* functions
                zinventory group_vars for '%s'zplaybook group_vars for '%s'r�)r,�grouprzr�r�r�s  ����r.�plugins_by_groupsz3VariableManager.get_vars.<locals>.plugins_by_groupss����
��(�@�@�E�"4�"4�T�%�[�BT�BT�UZ�B[�B[�]|�@E�^E�#F�#F�D��K�"4�"4�T�%�[�-�-�PU�BV�BV�Xv�y~�X~�"�"�D��K�K��r0zCalling z to load vars for z!group vars, precedence entry '%s'z.Ignoring unknown variable precedence entry: %szhost vars for '%s'zinventory host_vars for '%s'zplaybook host_vars for '%s'�facts�
ansible_localz	play vars�r?�	variablesz�Invalid vars_files entry found: %r
vars_files entries should be either a string type or a list of string types after template expansion�varsTF)�unsafe�cachezplay vars_files from '%s'zvars file %s was not found�module_setupzTan undefined variable was found when attempting to template the vars_files item '%s')�objz4skipping vars_file '%s' due to an undefined variablezRead vars_file '%s'zJError while reading vars files - please supply a list of file names. Got 'z
' of type )�include_paramszrole '%s' varsz	task vars�include_vars�set_factzrole '%s' paramszinclude paramsz
extra varsz
magic vars�environment�ansible_delegated_vars�_ansible_loop_cachezdone with get_vars())ArR�debugr@�_get_magic_variablesrPrG�get_basedir�	get_roles�get_default_varsr�rt�PLAYBOOK_VARS_ROOT�get_search_pathr
�_role�action�_ACTION_INCLUDE_ROLE�
get_dep_chainrF�groupsrNr�
get_groups�VARIABLE_PRECEDENCE�_ALLOWED�localsrSr�r!rQr"�INJECT_FACTS_AS_VARSr#�KeyError�get_vars_filesrrCrr(r)�templater	�path_dwim_relative_stackr/�load_from_filerrrr�vvv�	TypeErrorr*�DEFAULT_PRIVATE_ROLE_VARSrB�get_namerA�get_role_params�get_include_paramsr��copy�delegate_to�_get_delegated_varsru�VarsWithSources�new_vars_with_sources))rTrmrnrkrorp�	use_cacherqrrr��all_vars�magic_variables�roler�r9r8r7r6r5r4r��entryr��
vars_files�vars_file_item�	temp_vars�templar�vars_file_list�	vars_file�play_search_stack�
found_file�	real_filer,r-rzr�r�ryr�r�r�s)`        `                        @@@@@@@r.r�zVariableManager.get_vars�s�����������2	�
�
�5�6�6�6��6�6���3�3����-� 3��!�4�
�
���
�
	0�
	0�
	0�
	0�
	0�����	4���0�0�2�2�3�H��	s����(�(�
s�
s��-�-�h��8M�8M�8O�8O�Qe�hl�hq�Qq�r�r����	V��#�u�,�,��/�/�1�1����%�)C�C�C� �0�0�2�2�1�5�6����%��.�.�"�#D�q�G[�#[�\�\�\�
�z�%�4�%�4�;�!�BX�3X�3X�-�-�h��
�8S�8S�^b�^p�^p�^r�^r�8S�8s�8s�.B�T�Z�_�.T�V�V���_	���.�2�2�5�9�9�I�%�&]�&]�$�/�/�2C�2C�&]�&]�&]�^�^�K�
�
�
�
�
�&
p�
p�
p�
p�
p�
p�
�
�
�
�
�
�
�
�
,�
,�
,�
,�
,�
7�
7�
7�
7�
7�
7�
2�
2�
2�
2�
2�
2�
3�
3�
3�
3�
3�
7�
7�
7�
7�
7�
7�
2�
2�
2�
2�
2�
2�	
�	
�	
�	
�	
�	
�	
�	
��.�
`�
`���D�M�)�)��M�M�M�e�e�e�T�Y�Y�"W�X�X�X�1�1�(�O�F�H�H�U�O�<M�<M�Or�uz�Oz�{�{�H�H��O�O�$T�X]�$^�_�_�_�_�*�)�(�D�M�M�O�O�EY�\`�E`�a�a�H�)�)�(�4F�4F��v�4N�4N�Pn�qu�Pu�v�v�H�)�)�(�M�M�4�&�4I�4I�Kh�ko�Ko�p�p�H�
� ��!1�!5�!5�d�i��!D�!D�E�E���O�E�2�2�2���)�B�1�1�(�H�[�QV�EW�EW�<X�<X�Za�b�b�H�H� 2�1�(�H�o�W\�W`�W`�ap�rt�Wu�Wu�Ev�<w�<w�zA� B� B�H����
�
�
���
�����G	�)�)�(�D�M�M�O�O�[�Q�Q�H��,�,�.�.�J�=
a�&0�9H�9H�N�!-�X�t�7G� H� H�I� ,�Y�� H� H�I�%�T�\�Y�O�O�O�G�
&4�N�%�n�d�;�;�:�*8�)9��
#%�)7�i�i�I�(/�(8�(8��(C�(C�I�$.�y�(�$C�$C�"�&2�%V�Xa�%b�'"�'"�!"�
&�48�4H�4H�4J�4J� 1�9=��9^�9^�_p�rx�{D�:E�:E�!E�
�Y�'6�t�|�7R�7R�S]�fj�rw�7R�7x�7x�'y�'y��#'�#3�04�%�%��3E�3E�h�PT�Vq�t}�V}�3~�3~��� %���#6�)�)�)� (��#5�&�&�&� %�&����
 3�i�t�i�&9�:V�Yg�:g�&h�&h� h���*�,D�E�%�%�%��+��0@�0D�0D�T�Y�PT�PV�PV�0W�0W�0[�0[�\j�0k�0k�+�pt�qA�":�<R�=K�<L�Q_�#a�#a�#a�a�
$�K�K�(^�ao�(o�p�p�p�$�H�%�����K�K� 5�� F�G�G�G�G�s9H��t�
a�
a�
a�(�(�BL�*�*�d�S]�N^�N^�N^�*`�a�a�a�
a�����.�
� �N�N�,�,���D�1�1�(�D�M�M�Y^�M�<_�<_�aq�tx�t}�a}�~�~�H�H�
�	R��z�
R�-�-�h��
�8K�8K�D�L^�L^�L`�L`�qv�8K�8w�8w�.>����.P�R�R��)�)�(�D�M�M�O�O�[�Q�Q�H��	w�)�)�(�D�4D�4H�4H������Z^�Z`�Z`�4a�4a�cq�r�r�H�)�)�(�D�4R�4V�4V�W[�W`�bf�bh�bh�4i�4i�ku�v�v�H��	a��z�
P�-�-�h��
�8R�8R�SW�Se�Se�Sg�Sg�8h�8h�j|�@D�@J�@O�kO�P�P��
*�)�(�D�4K�4K�4M�4M�O_�`�`�H�&�%�h��0@�,�O�O��&�%�h���N�N���	7�&*�&6�H�]�#��	/�4�	/�'�}�}���H�V���	A�D�	A�T�-�9�>Q�9�RV�Rj�Rj�ko�qu�w�SA�SA�O�H�-�.��9N�0O��
�
�,�-�-�-��?�	�"�8�8��=�Q�Q�Q��Osk�<B#N � 
N-�,N-�'AW�AT)�A3S8�6T)�8
T�T)�T�T)�(W�)BV2�.W�1V2�2"W�-Xc���i}tj�|j�����|d<t
j|d<tj|d<�r}td��j
D����}	d��j
D��}
tt|	|
z����|d<|
|d<|	|d<|d|d	<����|d
<|r{|j
rt|j
�d���|d
<|j
j|d<t|j
j��|d<|j
j|d<|j
���|d<|j��|j���|d<�r�t)|j���}�js|��j��rd}n	�jpd}|s&d�|j�|d���D��}|s#d�|j���D��}|dd�|d<�fd�|dD��|d<�fd�|D��|d<|d|d<|j|d <|j���D]
\}
}|||
<�|j�|r
|j|d!<|S)"z�
        Returns a dictionary of so-called "magic" variables in Ansible,
        which are special variables we set internally for use.
        r}�ansible_playbook_python�ansible_config_filec�d�h|]-}|���D]}|������.Sr�)�get_all_dependenciesr�)r��r�ds   r.�	<setcomp>z7VariableManager._get_magic_variables.<locals>.<setcomp>�s:��)m�)m�)m�1�TU�Tj�Tj�Tl�Tl�)m�)m�q�!�*�*�,�,�)m�)m�)m�)mr0c�6�g|]}|�����Sr�)r�)r�r�s  r.r�z8VariableManager._get_magic_variables.<locals>.<listcomp>�s ��@�@�@��q�z�z�|�|�@�@�@r0�ansible_role_names�ansible_play_role_names�ansible_dependent_role_names�
role_names�ansible_play_nameF)�include_role_fqcn�	role_name�	role_path�	role_uuid�ansible_collection_name�ansible_role_nameNr�r>r{c��g|]	}|j��
Sr�r��r��hs  r.r�z8VariableManager._get_magic_variables.<locals>.<listcomp>�s��!w�!w�!w�Q�!�&�!w�!w�!wr0T)�pattern�ignore_restrictionsc��g|]	}|j��
Sr�r�r�s  r.r�z8VariableManager._get_magic_variables.<locals>.<listcomp>�s��J�J�J��a�f�J�J�Jr0�ansible_play_hosts_allc�&��g|]
}|�jv�|��Sr���_removed_hosts�r��xrms  �r.r�z8VariableManager._get_magic_variables.<locals>.<listcomp>�sI���3C�3C�3C��ef�nr�oB�fB�fB�1�fB�fB�fBr0�ansible_play_hostsc�&��g|]
}|�jv�|��Sr�rrs  �r.r�z8VariableManager._get_magic_variables.<locals>.<listcomp>�s'���2e�2e�2e���QU�Qd�Hd�Hd�1�Hd�Hd�Hdr0�ansible_play_batch�
play_hosts�omit�hostvars)rIr��abspathrGr��sys�
executablert�CONFIG_FILEr)�roles�setr�r��
_role_pathr�_uuid�_role_collectionrF�get_groups_dictr�	finalized�is_template�hosts�	get_hostsrLrM�itemsrH)rTrmrnrkrorprqrrr��dependency_role_names�play_role_namesr�r��option�option_values `             r.r�z$VariableManager._get_magic_variables�s����	�$&�G�O�O�D�L�4L�4L�4N�4N�$O�$O�	�.�!�/2�~�	�+�,�+,�=�	�'�(��	=�$(�)m�)m��
�)m�)m�)m�$n�$n�!�@�@�T�Z�@�@�@�O�/3�3�7L��7^�3_�3_�.`�.`�I�*�+�4C�I�/�0�9N�I�4�5�'0�0I�&J�I�l�#�-1�]�]�_�_�I�)�*��	G��z�
G�)-��)<�)<�u�)<�)U�)U�	�+�&�)-��)>�	�+�&�)2�4�:�3C�)D�)D�	�+�&�7;�z�7R�	�3�4�15��1D�1D�1F�1F�	�-�.��?�&�"&�/�"A�"A�"C�"C�I�h���
J�!���6�6�6���~�2�'�*=�*=�d�j�*I�*I�2�#�G�G�"�j�1�E�G�!�x�!w�!w�$�/�2K�2K�T[�qu�2K�2v�2v�!w�!w�!w�J��K�J�J�d�o�.G�.G�.I�.I�J�J�J�F�6@����m�	�2�3�3C�3C�3C�3C�i�H`�>a�3C�3C�3C�	�.�/�2e�2e�2e�2e�f�2e�2e�2e�	�.�/�+4�4H�*I�	�,�'�!�,�	�&��$(�$6�$<�$<�$>�$>�	-�	-� �F�L� ,�I�f����>�%�*:�%�$(�N�I�j�!��r0c���t|d��sidfS|���}|���|d<|j���|dvr2|d�|j�����t
|j|����g}d}|j��|jtvr�d}|jdkrd}	t|j
�|d���}|s�fd�|D��}tj|j|j��	��}	d
D]
}
|
|jvrn�t|	d|
dz��t|	�||�
����}ne#t $rdg}YnVwxYwt#d|jz���|j
�/	��|j
��}n#t $rdg}Yn	wxYwd}dg}t'��}t)|jdd��}d}
|D�]A}|�|||<|�_��|jd���}||jkrd}
|�t#d|j����t3|t4��s&t#dt7|��z|j����||vr��d}|j�[|j�|��}|�>|j�dd���D]}|j|kr|}n�tA|���}ntA|���}|�!|||dd���||<|�d��||d<��Cd}|r|
r|}||fS)N�loop�ansible_search_pathr�T�first_foundF)�termsr��fail_on_undefined�convert_barec�>��g|]}��|���|��Sr�)r)r��tr�s  �r.r�z7VariableManager._get_delegated_vars.<locals>.<listcomp>,s-���%Z�%Z�%Z�A�7�CV�CV�WX�CY�CY�%Z�a�%Z�%Z�%Zr0)r?r�)r��var�file�_subdir�s)r!r�zDFailed to find the lookup named '%s' in the available lookup plugins�loop_varr-)r"z$Undefined delegate_to host for task:)�messager�z^the field 'delegate_to' has an invalid type (%s), and could not be converted to a string type.)�
ignore_limitsr�r�)rmrnrkrpro�inventory_hostname)"r�r�r�rGr��appendr�	loop_withrrrrNr��setattrr!r�rr
r�r@�getattr�loop_control�available_variablesr��_dsr(rr*rF�get_hostr�addressrr�)rTrmrk�existing_variables�	vars_copyr�has_loop�fail�
loop_terms�mylookup�subdir�delegated_host_vars�item_var�cache_itemsr-�delegated_host_name�delegated_hostr�r�r�s                   @r.r�z#VariableManager._get_delegated_varssW����t�V�$�$�	��t�8�O�
'�+�+�-�-�	�,0�+?�+?�+A�+A�	�'�(��<�#�#�%�%�Y�7L�-M�M�M��+�,�3�3�D�L�4L�4L�4N�4N�O�O�O�����C�C�C�������>�%��~��.�.����>�]�2�2� �D�#�!<�4�9�V]�qu�EJ�"K�"K�"K�J��[�%Z�%Z�%Z�%Z��%Z�%Z�%Z�
�,�0�����^e�f�f�f�H�#>�"�"��!�T�[�0�0�!�E�1��H�i��#��>�>�>�$�X�\�\�
�i�\�%X�%X�Y�Y�E�E��+�#�#�#�"�F�E�E�E�#����
#�#i�lp�lz�#z�{�{�{�
�Y�
"�
��(�(���3�3����'�
�
�
������
����
�H��F�E�#�f�f���4�,�j�&�A�A�����0	q�0	q�D���&*�	�(�#�*3�G�'�")�"2�"2�4�3C�W\�"2�"]�"]��"�d�&6�6�6�"��"�*�"�+Q�W[�W_�`�`�`�`��1�<�@�@�
u�"�,J�LP�Qd�Le�Le�,f�ko�ks�u�u�u�u�#�&9�9�9��"�N���*�!%��!9�!9�:M�!N�!N��"�)�!�_�6�6�T�_c�6�d�d�H�H���9�(;�;�;�-.�N�!�E�<�*.�3F�)G�)G�)G���!%�+>�!?�!?�!?��8<�}�}��#��$)�!%�8E�8�8�� 3�4�NW�]�]�[o�Mp�Mp�� 3�4�5I�J�J�"���	(��	(�
#(��"�$7�7�7s%�BE%�%
E5�4E5�F2�2
G�Gc�<�|j�|d��dS)z-
        Clears the facts for a host
        N)rQ�pop)rT�hostnames  r.�clear_factszVariableManager.clear_facts�s#��	
����X�t�,�,�,�,�,r0c�X�t|t��stdt|��z���	|j|}t|t
��s0t
d�|t|�������||z}n#t$r|}YnwxYw||j|<dS)�O
        Sets or updates the given facts for a host in the fact cache.
        zIthe type of 'facts' to set for host_facts should be a Mapping but is a %szCThe object retrieved for {0} must be a MutableMapping but was a {1}N)	r(rrr*rQrr��formatr�)rTrnr��
host_caches    r.�set_host_factszVariableManager.set_host_facts�s���
�%��)�)�	C�'�(s�vz�|A�wB�wB�)B�C�C�
C�
	 ��)�$�/�J�
�j�.�9�9�
I��!)�)/���d�:�6F�6F�)G�)G�I�I�I�
�%��J�J���	�	�	��J�J�J�	����",������s�
B�B�Bc���t|t��stdt|��z���	|j|xx|zcc<dS#t
$r||j|<YdSwxYw)rHzRthe type of 'facts' to set for nonpersistent_facts should be a Mapping but is a %sN)r(rrr*rAr�)rTrnr�s   r.�set_nonpersistent_factsz'VariableManager.set_nonpersistent_facts�s���
�%��)�)�	L�'�(|�@D�EJ�@K�@K�)K�L�L�
L�	9��*�4�0�0�0�E�9�0�0�0�0�0���	9�	9�	9�38�D�*�4�0�0�0�0�	9���s�A
�
A%�$A%c�F�||jvrt��|j|<||j|vrbt|j||t��r<t|t��r't	|j|||i��|j|<dS||j||<dS)z<
        Sets a value in the vars_cache for a host.
        N)rBr@r(rr)rTrn�varname�values    r.�set_host_variablez!VariableManager.set_host_variable�s����t�'�'�'�%)�V�V�D��T�"��d�&�t�,�,�,��D�<L�T�<R�SZ�<[�]k�1l�1l�,�q{�}B�DR�rS�rS�,�%1�$�2B�4�2H�7�TY�JZ�%[�%[�D��T�"�"�"�.3�D��T�"�7�+�+�+r0)NNN)	NNNTTTNNrk)NN)�__name__�
__module__�__qualname__�	frozensetr�rXrcre�propertyr]rjr�r�r�rFrKrMrQr�r0r.r2r2Gs �������y�X�X�X�Y�Y�H�"�"�"�"�<
�
�
����� � ��X� �$�$�$�tx�5;�o�o�o�o�b	F�F�F�F�P@8�@8�@8�D-�-�-�,�,�,�.9�9�9�	4�	4�	4�	4�	4r0r2c�^�eZdZdZd�Zed���Zd�Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
d�ZdS)
r�a"
    Dict-like class for vars that also provides source information for each var

    This class can only store the source for top-level vars. It does no tracking
    on its own, just shows a debug message with the information that it is provided
    when a particular var is accessed.
    c�6�t|i|��|_i|_dS)z Dict-compatible constructor N)r@r,�sources)rT�args�kwargss   r.rXzVarsWithSources.__init__�s!���$�)�&�)�)��	�����r0c�*�||��}||_|S)z@ Alternate constructor method to instantiate class with sources )rY)�clsr,rY�vs    r.r�z%VarsWithSources.new_vars_with_sources�s��
�C��I�I����	��r0c�8�|j�|d��Srg)rYrN�rTrxs  r.�
get_sourcezVarsWithSources.get_source�s���|����T�*�*�*r0c	��|j|}t�d|�d|j�|d������|S)Nz
variable 'z' from source: �unknown)r,rRr�rYrN)rTrx�vals   r.�__getitem__zVarsWithSources.__getitem__�sE���i��n���
�
�
����d�l�>N�>N�s�T]�>^�>^�>^�_�`�`�`��
r0c��||j|<dSrg�r,)rTrxrPs   r.�__setitem__zVarsWithSources.__setitem__�s����	�#���r0c��|j|=dSrgrgr`s  r.�__delitem__zVarsWithSources.__delitem__�s���I�c�N�N�Nr0c�*�t|j��Srg)�iterr,rhs r.�__iter__zVarsWithSources.__iter__�s���D�I���r0c�*�t|j��Srg)�lenr,rhs r.�__len__zVarsWithSources.__len__�s���4�9�~�~�r0c�6�|j�|��Srg)r,�__contains__r`s  r.rrzVarsWithSources.__contains__�s���y�%�%�c�*�*�*r0c��t�|j���|j�����Srg)r�r�r,r�rYrhs r.r�zVarsWithSources.copy�s2���4�4�T�Y�^�^�5E�5E�t�|�GX�GX�GZ�GZ�[�[�[r0N)rRrSrT�__doc__rX�classmethodr�rarerhrjrmrprrr�r�r0r.r�r��s������������
����[��+�+�+����������������+�+�+�\�\�\�\�\r0r�)@�
__future__rrrr*�
__metaclass__rIr�collectionsr�collections.abcrrr	�hashlibr
�jinja2.exceptionsr�ansiblerrt�ansible.errorsr
rrrrr�ansible.inventory.hostr�ansible.inventory.helpersrr�ansible.module_utils._textr�ansible.module_utils.sixrr�ansible.plugins.loaderr�ansible.vars.fact_cacher�ansible.templater�ansible.utils.displayr�ansible.utils.listifyr�ansible.utils.varsrrr �ansible.utils.unsafe_proxyr!�ansible.vars.cleanr"r#�ansible.vars.pluginsr$r%rRr/r2r�r�r0r.�<module>r�s���&C�B�B�B�B�B�B�B�B�B��
�	�	�	�	�
�
�
�
�#�#�#�#�#�#�=�=�=�=�=�=�=�=�=�=�������,�,�,�,�,�,�"�"�"�"�"�"�X�X�X�X�X�X�X�X�X�X�X�X�X�X�X�X�'�'�'�'�'�'�A�A�A�A�A�A�A�A�.�.�.�.�.�.�<�<�<�<�<�<�<�<�0�0�0�0�0�0�-�-�-�-�-�-�$�$�$�$�$�$�)�)�)�)�)�)�=�=�=�=�=�=�O�O�O�O�O�O�O�O�O�O�/�/�/�/�/�/�;�;�;�;�;�;�;�;�T�T�T�T�T�T�T�T�
�'�)�)�����*u	4�u	4�u	4�u	4�u	4�u	4�u	4�u	4�p.\�.\�.\�.\�.\�n�.\�.\�.\�.\�.\r0

Youez - 2016 - github.com/yon3zu
LinuXploit