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

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

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

���c���ddlmZmZmZeZddlZddlZddlZddl	Z	ddl
Z
ddlZddlm
Z
mZddlmZddlmZddlmZddlmZmZmZmZddlmZmZmZdd	lm Z dd
l!m"Z"ddl#m$Z$ddl%m&Z&dd
l'm(Z(m)Z)m*Z*m+Z+ddl,m-Z-m.Z.ddl/m0Z0m1Z1ddl2m3Z3ddl4m5Z5m6Z6	ddl7m8Z8ddl9m:Z:n#e;$rdZ8dZ:YnwxYwddl<Z=e3��Z>edddg��Z?d�Z@d�ZAdmd�ZBd�ZCGd�deD��ZEGd�deD��ZFGd�d ��ZGGd!�d"eG��ZHdnd$�ZId%�ZJd&�ZKd'�ZLd(�ZMeJ��ZNeM��eGd)d*ejOd+��ZPeGd,d-ejQd.d/�0��ZReGd1d2ejSd3��ZTeGd4d5ejUd6��ZVeGd7d8ejWd9d:d;id<�=��ZXeGd>d?d@d@��ZYeGdAdBejZdC��Z[eGdAdDej\dE��Z]eGdAdDej\dE��Z^eGdFdGej_dHdI�0��Z`eHdJdKejadL��ZbeHdMdNejcdO��ZdeGdPdQejedRdS�0��ZfeGdTdUejgdVdW�0��ZheGdXdYejidZ��ZjeGd[d\ejkd]d^�0��ZleGd_d`ejmdadb�0��ZneGdcddejode��ZpeGdfdgejqdhdi�0��ZreGdjdkejsdl��ZtdS)o�)�absolute_import�division�print_functionN)�defaultdict�
namedtuple)�
format_exc)�__version__)�	constants)�AnsibleError�AnsiblePluginCircularRedirect�AnsiblePluginRemovedError�(AnsibleCollectionUnsupportedVersionError)�to_bytes�to_text�	to_native)�
import_module)�string_types)�	from_yaml)�
AnsibleLoader)�get_plugin_class�MODULE_CACHE�
PATH_CACHE�PLUGIN_PATH_CACHE)�AnsibleCollectionConfig�AnsibleCollectionRef)�_AnsibleCollectionFinder�_get_collection_metadata)�Display)�
add_fragments�find_plugin_docfile)�SpecifierSet)�Version�get_with_context_result�object�plugin_load_contextc�V�d�t�����D��S)Nc�F�g|]\}}t|t���||f��S�)�
isinstance�PluginLoader)�.0�name�objs   �;/usr/lib/python3.11/site-packages/ansible/plugins/loader.py�
<listcomp>z*get_all_plugin_loaders.<locals>.<listcomp>3s0��^�^�^�K�T�3�
�3�P\�@]�@]�^�T�3�K�^�^�^�)�globals�itemsr(r0r.�get_all_plugin_loadersr32s$��^�^�7�9�9�?�?�+<�+<�^�^�^�^r0c��tj�t|d�����}tj�|��r�t��D]\}}|jrstj�|t|j����}tj�|��r"|�t|������dSt�dt|��z��dS)z3 add any existing plugin dirs in the path provided �surrogate_or_strict��errorszFIgnoring invalid path provided to plugin path: '%s' is not a directoryN)�os�path�
expanduserr�isdirr3�subdir�join�
add_directoryr�display�warning)r9�b_pathr,r-�plugin_paths     r.�add_all_plugin_dirsrC6s���
�W�
�
���6K� L� L� L�
M�
M�F�	�w�}�}�V���r�/�1�1�	<�	<�I�D�#��z�
<� �g�l�l�6�8�C�J�3G�3G�H�H���7�=�=��-�-�<��%�%�g�k�&:�&:�;�;�;��		<�	<�	���`�cj�ko�cp�cp�p�q�q�q�q�qr0c���|s�d}|r�t|t��r}tj�|��}	t
�|��}n#t$rd}YnwxYw|�.t
���D]}||j	vr	|j
}n�ntd���t
�|��}|std|z���|rt|d|��|S)N�shz;Either a shell type or a shell executable must be provided z.Could not find the shell plugin required (%s).�
executable)
r)rr8r9�basename�shell_loader�get�	Exception�all�COMPATIBLE_SHELLS�SHELL_FAMILYr�setattr)�
shell_typerF�shell_filename�shells    r.�get_shell_pluginrRCs$���^��
��	^��*�l�3�3�
"�!#��!1�!1�*�!=�!=��!�(�,�,�^�<�<�E�E�� �!�!�!� �E�E�E�!�����=�!-�!1�!1�!3�!3�"�"��)�U�-D�D�D�).�);�J�!�E�E���\�]�]�]����Z�(�(�E��Z��K�j�X�Y�Y�Y��1���|�Z�0�0�0��Ls�A�A&�%A&c��ttjtd|z��}|D]}|�|d����dS)Nz	%s_loaderT)�with_subdir)�getattr�sys�modules�__name__r>)�which_loader�paths�loaderr9s    r.�add_dirs_to_loaderr\dsR��
�S�[��*�K�,�,F�
G�
G�F��5�5�����T�t��4�4�4�4�5�5r0c��eZdZd�ZdS)�PluginPathContextc�"�||_||_dS�N)r9�internal)�selfr9ras   r.�__init__zPluginPathContext.__init__ls����	� ��
�
�
r0N)rX�
__module__�__qualname__rcr(r0r.r^r^ks#������!�!�!�!�!r0r^c�B�eZdZd�Zed���Zd�Zd�Zd�Zd�Z	dS)�PluginLoadContextc���d|_g|_g|_g|_g|_d|_d|_d|_d|_d|_	d|_
d|_d|_g|_
d|_d|_d|_dS�NF)�
original_name�
redirect_list�
error_list�import_error_list�
load_attempts�pending_redirect�exit_reason�plugin_resolved_path�plugin_resolved_name�plugin_resolved_collection�
deprecated�removal_date�removal_version�deprecation_warnings�resolved�_resolved_fqcn�
action_plugin�rbs r.rczPluginLoadContext.__init__rs���!���������!#������ $������$(��!�$(��!�*.��'���� ���#���$&��!���
�"���!����r0c�0�|jsdS|js�|jd}tj|��r0|�d��r|�d��d}|jr!tj|��s
|jdz|z}||_|jS)N����ansible.legacy.�.)rxryrkr�
is_valid_fqcr�
startswith�splitrs)rb�final_plugins  r.�
resolved_fqcnzPluginLoadContext.resolved_fqcn�s����}�	��F��"�	/��-�b�1�L�#�1�,�?�?�
I�L�D[�D[�\m�Dn�Dn�
I�+�1�1�2C�D�D�R�H���.�
T�7K�7Y�Zf�7g�7g�
T�#�>��D�|�S��".�D���"�"r0c�v�|s|S|�dd��pd}|�dd��}|�dd��}|�d}d�||rdnd|��}t�||||���d|_|r||_|r||_|j�|��|S)	N�warning_text�rurvz{0} has been deprecated.{1}{2}� )�date�version�collection_nameT)rI�formatr?rtrurvrw�append)rbr,�deprecationr�r�rurvs       r.�record_deprecationz$PluginLoadContext.record_deprecation�s����	��K�#���~�t�<�<�B���"���~�t�<�<��%�/�/�*;�T�B�B���#�"�O�7�>�>�t�L�E`�S�S�^`�bn�o�o�����<�l�O�et��u�u�u�����	-� ,�D���	3�#2�D� ��!�(�(��6�6�6��r0c�h�d|_||_||_||_||_d|_||_|S)NT)rorrrqrsrprxrz)rb�
resolved_name�
resolved_path�resolved_collectionrprzs      r.�resolvezPluginLoadContext.resolve�s>�� $���$1��!�$1��!�*=��'�&�����
�*����r0c�b�||_d�|j|��|_d|_|S)Nz+pending redirect resolution from {0} to {1}F)ror�rjrprx)rb�
redirect_names  r.�redirectzPluginLoadContext.redirect�s3�� -���H�O�O�PT�Pb�dq�r�r�����
��r0c�0�d|_||_d|_|Sri)rorprx)rbrps  r.�nopezPluginLoadContext.nope�s�� $���&�����
��r0N)
rXrdrerc�propertyr�r�r�r�r�r(r0r.rgrgqsz������"�"�"�&�#�#��X�#����0����������r0rgc��eZdZdZd!d�Zed���Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d"d
�Zd"d�Zd"d�Zd�Zd#d�Zd$d�Zd#d�Zd%d�Zd%d�Zdddde��fd�Zd&d�Zd$d�ZeZd�Zd!d�Zd�Zd�Zd!d�Z d �Z!dS)'r*z�
    PluginLoader loads plugins from the configured plugin directories.

    It searches for plugins by iterating through the combined list of play basedirs, configured
    paths, and the python path.  The first match is used.
    Nc���|�in|}||_||_||_||_||_|rt|t��s|g}n|sg}||_|tvr
it|<|tvr
dt|<|tvrtt��t|<g|_
t||_t||_t||_t#��|_dSr`)�
class_name�
base_class�packager<�aliasesr)�list�configrrrr�dict�_extra_dirs�
_module_cache�_paths�_plugin_path_cache�set�_searched_paths)rbr�r�r�r<r��required_base_classs       r.rczPluginLoader.__init__�s�����"�"�W��$���-�������������	�*�V�T�2�2�	��X�F�F��	��F�����\�)�)�')�L��$��Z�'�'�%)�J�z�"��.�.�.�,7��,=�,=��j�)����*�*�5��� ��,���"3�J�"?���"�u�u����r0c�4�tj|j��Sr`)r� legacy_plugin_dir_to_plugin_typer<r{s r.�typezPluginLoader.type�s��#�D�T�[�Q�Q�Qr0c�6�d�|j��S)NzPluginLoader(type={0}))r�r�r{s r.�__repr__zPluginLoader.__repr__�s��'�.�.�t�y�9�9�9r0c�^�tjr	d|_dSit|j<dt
|j<t
t��t|j<t|j|_	t
|j|_t|j|_
t��|_dSr`)
�C�OLD_PLUGIN_CACHE_CLEARINGr�rr�rrr�rr�r�r�r�r{s r.�
_clear_cacheszPluginLoader._clear_caches�s����&�	)��D�K�K�K�-/�L���)�*.�J�t��'�1<�T�1B�1B��d�o�.�".�d�o�!>�D��$�T�_�5�D�K�&7���&H�D�#�#&�5�5�D� � � r0c�.�|�d��}|�d��}|�d��}|�d��}|�d��}|�d��}|�d��t|<|�d��t|<|�||||||��|�d	g��|_|�d
t����|_dS)z
        Deserializer.
        r�r�r�r<r�r�rrr�r�N)rIrrrcr�r�r�)rb�datar�r�r�r<r�r�s        r.�__setstate__zPluginLoader.__setstate__s���
�X�X�l�+�+�
��(�(�9�%�%�����(�#�#�����(�#�#���(�(�9�%�%���X�X�l�+�+�
�!%���,�!7�!7�
�:��(,���1D�(E�(E��*�%��
�
�j�'�6�6�7�J�O�O�O��8�8�M�2�6�6���#�x�x�(9�3�5�5�A�A����r0c
���t|j|j|j|j|j|j|j|jt|jt|j��
�
S)z
        Serializer.
        )
r�r�r�r�r<r�r�r�rr)r�r�r�r�r�r<r�r�r�rrr{s r.�__getstate__zPluginLoader.__getstate__sY��
������L��;��;��L��(� �0�!�$�/�2�/���@�
�
�
�	
r0c��g}|D]}||vr|�|���tj�|��S)z; Returns a string suitable for printing of the search path )r�r8�pathsepr=)rbrZ�ret�is    r.�format_pathszPluginLoader.format_paths*sE�����	�	�A���|�|��
�
�1�
�
�
���z���s�#�#�#r0c�T�|�|�d�����S)NF��subdirs)r��
_get_pathsr{s r.�print_pathszPluginLoader.print_paths4s$��� � ������!?�!?�@�@�@r0c���g}|�|��tj|d���D]B\}}}d|vr8|D]5}|�tj�||�����6�C|S)NT)�followlinksz__init__.py)r�r8�walkr9r=)rb�dir�results�rootr��files�xs       r.�_all_directorieszPluginLoader._all_directories7s��������s����$&�G�C�T�$B�$B�$B�	:�	:� �D�'�5���%�%� �:�:�A��N�N�2�7�<�<��a�#8�#8�9�9�9�9���r0Tc��|jsgSt|d��s�t|j��}|j�d��dd�}|D]}t	||��}�ttj�|j	��d���|_
|r|�|j
��S|j
gS)z# Gets the path of a Python package �package_pathr�Nr5r6)r��hasattr�
__import__r�rUrr8r9�dirname�__file__r�r�)rbr��m�parts�
parent_mods     r.�_get_package_pathszPluginLoader._get_package_paths@s����|�	��I��t�^�,�,�	c��4�<�(�(�A��L�&�&�s�+�+�A�B�B�/�E�#�
+�
+�
��A�z�*�*��� '������
�(C�(C�La� b� b� b�D���	<��(�(��):�;�;�;��!�"�"r0c��|j�|jSd�|jD��}|j��
|jD�]}tj�tj�|����}|r�tjd|z��tjd|z��z}|D]Y}t|d���}tj�	|��r'||vr#|�
t|d�����Zt|d���}||vr#|�
t|d������|�d�|�
|�	��D����|�d
����||_|S)zE Return a list of PluginPathContext objects to search for plugins in Nc�.�g|]}t|d����S�F�r^�r+�ps  r.r/z8PluginLoader._get_paths_with_context.<locals>.<listcomp>Xs#��E�E�E�q� ��E�*�*�E�E�Er0z%s/*z%s/*/*r5r6Fc�.�g|]}t|d����S�Tr�r�s  r.r/z8PluginLoader._get_paths_with_context.<locals>.<listcomp>ls#��a�a�a�1�%�a��.�.�a�a�ar0r�c�6�|j�d��S)Nz/windows)r9�endswith)r�s r.�<lambda>z6PluginLoader._get_paths_with_context.<locals>.<lambda>~s��q�v���z�:�:�r0��key)r�r�r�r8r9�abspathr:�globrr;r�r^�extendr��sort)rbr�r�r9�contents�cs      r.�_get_paths_with_contextz$PluginLoader._get_paths_with_contextOs����;�"��;��E�E�D�4D�E�E�E���;�"���
?�
?���w���r�w�'9�'9�$�'?�'?�@�@���D�#�y��$��7�7�$�)�H�t�O�:T�:T�T�H�%�D�D��#�A�.C�D�D�D���7�=�=��+�+�D������J�J�'8��E�'B�'B�C�C�C���t�,A�B�B�B���s�?�?��J�J�0��u�=�=�>�>�>��
	�
�
�a�a��8O�8O�X_�8O�8`�8`�a�a�a�b�b�b�$	���:�:��;�;�;�����
r0c�F�|�|���}d�|D��S)z1 Return a list of paths to search for plugins in r�c��g|]	}|j��
Sr()r9)r+�path_with_contexts  r.r/z+PluginLoader._get_paths.<locals>.<listcomp>�s��S�S�S�+<�!�&�S�S�Sr0)r�)rbr��paths_with_contexts   r.r�zPluginLoader._get_paths�s0��"�9�9�'�9�J�J��S�S�@R�S�S�S�Sr0c��|jr�t|j��}|tjvr�tj�||��s�t
t|dd��|������}|r�t||t|dk���d|vrmt|dt��rTtj�
|||d��t�d|�d|�d	���d
Sd
Sd
Sd
Sd
Sd
Sd
S)zf Reads plugin docs to find configuration setting definitions, to push to config manager for later use �
DOCUMENTATIONr�)�	file_name�module)�fragment_loader�	is_module�optionszLoaded config def from plugin (�/�)N)r�rr��CONFIGURABLE_PLUGINSr��has_configuration_definitionrrU�get_single_datarr�r)r��+initialize_plugin_configuration_definitionsr?�debug)rbr,r�r9�	type_name�dstrings      r.�_load_config_defszPluginLoader._load_config_defs�s=���?�	c�(���9�9�I��A�2�2�2�1�8�;`�;`�aj�lp�;q�;q�2�'�����(L�(L�X\�]�]�]�m�m�o�o���c�!�'�4��]f�jr�]r�t�t�t�t� �G�+�+�
�7�9�;M�t�0T�0T�+���L�L�Y�X\�^e�fo�^p�q�q�q��
�
�
�QZ�QZ�QZ�\`�\`�\`�&a�b�b�b�b�b�#	c�	c�3�2�2�2�c�c�,�+�+�+r0Fc�F�tj�|��}|�}|r%tj�||j��}||jvrO|j�|��|���t�	d|z��dSdSdS)z1 Adds an additional directory to the search path NzAdded %s to loader search path)
r8r9�realpathr=r<r�r�r�r?r�)rb�	directoryrTs   r.r>zPluginLoader.add_directory�s����G�$�$�Y�/�/�	�� ��
A��G�L�L��D�K�@�@�	��� 0�0�0�� �'�'�	�2�2�2��"�"�$�$�$��
�
�>�)�L�M�M�M�M�M�!� �1�0r0c�:�t|j��}|sdS	t|jd�|��z��n#t$rYnwxYwt	|dd��}|sdS|jr"d�|j|jg��}n|j}|�di���|i���||zd��}|s>|�di���|i���|d��}|S)Nz.plugins.{0}�_collection_metar�plugin_routing)	r� n_python_collection_package_namer��ImportErrorrUr�r=�resourcerI)rb�acr�plugin_type�	extension�collection_pkg�collection_meta�subdir_qualified_resource�entrys        r.�_query_collection_routing_metaz+PluginLoader._query_collection_routing_meta�sC��&�s�'K�L�L���	��4�	��#�>��AV�AV�Wb�Ac�Ac�c�d�d�d�d���	�	�	��D�	����"�.�2D�d�K�K���	��4�
�;�	5�(+���#�+�s�|�1L�(M�(M�%�%�(+��%��#�#�$4�b�9�9�=�=�k�2�N�N�R�R�Sl�ox�Sx�z~�����	x�#�'�'�(8�"�=�=�A�A�+�r�R�R�V�V�Wp�rv�w�w�E��s�*A�
A�Ac	�z	�d|_tj|j��}tj||��}|�|||���}d}|�r�|�dd��}	|s|�||	|j��|�dd��}
|
r�|
�d��}|
�d��}|
�d��pd	}
d
�	||
rdnd	|
��}
t�|
||d|j�
��}||_||_
d|_||_t||����|�dd��}|r�tj|��st#d|j�d|�d|�d����t�d�	|||����||jvr|j�|��|�|��S|jdkr|�d��}t/|jd���}d�	|j|��}|r||z
}t4j�|j��}|sS	t9|j��}n=#t:$r0|�d�	|j����cYSwxYwt>j �!|j"��}t>j �#||��}t>j �$|��rD|�%|tM|��|jd�	||j��|��S|r;|�d�	tM|��|j����Sd�tOj(t>j �#||��dz��D��}|s.|�d�	||j����StS|��}tU|��d kr0t�+d!d"�#|��z��|�%|tM|d#��|jd$�	||j��|��S)%z�Search builtin paths to find a plugin. No external paths are searched,
        meaning plugins inside roles inside collections will be ignored.
        F)rNr��	tombstonerurvr�r�z{0} has been removed.{1}{2}r�T)�msgr�r��removedr��r%r��Collection � contains invalid redirect for �: �6. Redirects must use fully qualified collection names.z"redirecting (type: {0}) {1} to {2}rWrz�strictr6�{0}.{1}zPython package {0} not foundz found exact match for {0} in {1}zno match for {0} in {1}c��g|]B}tj�|���!|�tj���@|��CSr()r8r9�isfiler�r��MODULE_IGNORE_EXTS�r+�fs  r.r/z0PluginLoader._find_fq_plugin.<locals>.<listcomp>+sZ��V�V�V���'�.�.��+�+�V�45�J�J�q�?S�4T�4T�V�q�V�V�Vr0z.*z+failed fuzzy extension match for {0} in {1}r�zDFound several possible candidates for the plugin but using first: %s�,rz*found fuzzy extension match for {0} in {1}),rxrr�r<�	from_fqcrrrIr��
collectionr�r?�get_deprecation_messagerurvrpr
r�r�vvrkr�r�r�rr�n_python_package_namerVrWrrr�r8r9r�r�r=�existsr�rr��iglob�sorted�lenr�)rb�fq_namerr%�ignore_deprecatedr
r	�routing_metadatarzr�rrurvr��removed_msgr��
n_resource�	full_name�pkg�pkg_path�n_resource_path�found_filess                      r.�_find_fq_pluginzPluginLoader._find_fq_plugin�s��
(-��$�*�K�D�K�X�X��"�,�W�k�B�B�� �>�>�s�K�[d�>�e�e���
��.	F�*�.�.�}�d�C�C�K�%�
]�#�6�6�w��S�^�\�\�\�(�,�,�[�$�?�?�I��
f�(�}�}�^�<�<��"+�-�-�0A�"B�"B��(�}�}�^�<�<�B���<�C�C�G�T`�Mh�S�S�fh�jv�w�w��%�=�=�,�Xg�CO�Y]�NQ�n�>�^�^��4@�#�0�6E�#�3�/3�#�,�2=�#�/�/��Qd�e�e�e�e�'�+�+�J��=�=�H��
>�+�9�(�C�C��&�O�c�n�O�O�U\�O�O�`h�O�O�O�����
�
�?�F�F�{�T[�]e�f�f�g�g�g�
�"5�"C�C�C�'�5�<�<�W�E�E�E�*�3�3�H�=�=�=��y�I�%�%� 0� 4� 4�_� E� E�
��s�|�H�=�=�=�
��$�$�S�%>�
�K�K�	��	$��)�#�J��k�o�o�c�7�8�8���	r�
r�#�C�$=�>�>�����
r�
r�
r�*�/�/�0N�0U�0U�VY�Vo�0p�0p�q�q�q�q�q�
r�����7�?�?�3�<�0�0���'�,�,�x��<�<���7�>�>�/�*�*�	Z�&�.�.��7�?�3�3�S�^�Eg�En�En�ox�z}�{I�FJ�FJ�LY�Z�Z�
Z��	s�&�+�+�,E�,L�,L�W�U_�M`�M`�be�bp�,q�,q�r�r�r�V�V� $�
�2�7�<�<��*�+M�+M�PT�+T� U� U�V�V�V���	}�&�+�+�,Y�,`�,`�aj�lo�lz�,{�,{�|�|�|��[�)�)���{���a����M�M�`�cf�ck�ck�lw�cx�cx�x�y�y�y�"�*�*��w�{�1�~�.�.���8�?�?�	�3�>�Z�Z�\i�k�k�	ks�<J�7K�
Kr�c�b�|�|||||��}|jr|jr|jSdS)z Find a plugin named name N)�find_plugin_with_contextrxrq)rbr,�mod_typer,�
check_aliases�collection_list�results       r.�find_pluginzPluginLoader.find_plugin;sB���.�.�t�X�?P�R_�ap�q�q���?�	/�v�:�	/��.�.��tr0c��t��}||_	|�||||||���}|jrL|j|jvr-td�|j|j�����|j}d|_|}nn�p|jr3t�	d�||j����|S)zg Find a plugin named name, returning contextual info about the load, recursively resolving redirection Trz.plugin redirect loop resolving {0} (path: {1})Nz;errors were encountered during the plugin load for {0}:
{1})
rgrj�_resolve_plugin_steprorkrr�rlr?r@)rbr,r8r,r9r:r%r;s        r.r7z%PluginLoader.find_plugin_with_contextCs��/�1�1��,0��)�		��.�.�t�X�?P�R_�ap�GZ�.�[�[�F��&�
��*�f�.B�B�B�7�8h�8o�8o�pv�qE�GM�G[�9\�9\�]�]�]��.��*.��'�&,�#�#��		��)�	I��O�O�Z�a�a�bf�h{�iG�H�H�
I�
I�
I�#�"r0c����|std���|j����d|_�t|jvrd����|_|S|r|}n|jrd}nd}tj
���s|�r҉�d���s�d�vs|s�g}n�fd�|D��}|D�]6}		|j�|	��|	�d	��r-|�
��d
��||||��}nC|�|	|||���}|jr#|	|jvr|j�|	��|js|jr|cS��#t"t$t&f$r�t($r$}
|j�|
��Yd}
~
��d}
~
wt,$r2}|j�t1|����Yd}~��0d}~wwxYw|jrGt2�d��d
�|j�������d����|_|S|�
�||||��S)NzA PluginLoadContext is requiredFz#{0} matched a defined plugin filterz.pyr��Ansiblerc�<��g|]}d�|�����S)r)r�)r+r�r,s  �r.r/z5PluginLoader._resolve_plugin_step.<locals>.<listcomp>|s)���Q�Q�Q�A�i�.�.�q�$�7�7�Q�Q�Qr0zansible.legacyr~)r%r,z)plugin lookup for {0} failed; errors: {1}z; )rzno matches found for {0})�
ValueErrorrkr�rx�_PLUGIN_FILTERSr�r�rpr�rr�r�rn�_find_plugin_legacy�removeprefixr5ror
rrrrmrJrlrr?r�r=)rbr,r8r,r9r:r%�suffix�
candidates�candidate_name�ie�exs `          r.r>z!PluginLoader._resolve_plugin_stepasO���"�	@��>�?�?�?��)�0�0��6�6�6�',��$��?�4�<�0�0�0�.S�.Z�.Z�[_�.`�.`��+�&�&��	��F�F�
�_�	��F�F��F�
!�.�t�4�4�,	'��,	'�QU�Q`�Q`�aj�Qk�Qk�,	'��d�{�{�/�{�"�V�
�
�Q�Q�Q�Q��Q�Q�Q�
�",�
I�
I��I�'�5�<�<�^�L�L�L�%�0�0�1A�B�B�U�/3�.F�.F�t�GX�GX�Yj�Gk�Gk�GZ�\m�o|�E�/F�/F�+�+�/3�.B�.B�>�SY�pC�Uf�/C�/h�/h�+�/�7�U�N�Re�Rs�<s�<s�/�=�D�D�^�T�T�T�*�3�3�7J�7[�3�2�2�2�2�3��1�3P�Rz�{�����"�E�E�E�'�9�@�@��D�D�D�D�D�D�D�D����� �I�I�I�'�2�9�9�)�B�-�-�H�H�H�H�H�H�H�H�����I����#�-�
G��
�
�"M�"T�"T�UY�[_�[d�[d�ex�fD�\E�\E�#F�#F�
�G�G�G�.H�.O�.O�PT�.U�.U��+�&�&��'�'��.A�CT�Vc�ek�l�l�ls%�B.E2�2!G1�F2�2
G1�?'G,�,G1c������d|_|r�j�||��}�j|}	||}|j|_||_|jrdnd|_|jrd|zn||_	d|_|S#t$rYnwxYw�fd�����D��D�]�}|j}t|���t�d|z��|j�|��|j}		�fd�t#j���D��}
nA#t&$r4}t�d	t+|��z��Yd
}~nd
}~wwxYwd�|
D��D�]P�t"j����}t/�fd�t0jD����r�Ht"j�|��}
|
d
}	|
d}n#t6$rd}YnwxYwt+�d����|�jdvrt9�|	���jd|<|�jdvrt9�|	���jd|<|�j|vrt9�|	���j||<|�j|vrt9�|	���j||<��R�j�|��	||}|j|_||_|jrdnd|_|jrd|zn||_	d|_|cS#t$rY���wxYw|�d��s�d|z}||vr�||}|sTt"j� |j��s0t�!d|�"d��z��|j|_||_|jrdnd|_|jrd|zn||_	d|_|Sd�#|��}d|vr-tIj%|��r��&||||���S|�'d�#|����S)z�Search library and various *_plugins paths in order to find the file.
        This was behavior prior to the existence of collections.
        F�ansible.builtinr��ansible.builtin.Tc3��K�|]E}|j�jv�tj�t	|j�����A|V��FdSr`)r9r�r8r;r)r+r�rbs  �r.�	<genexpr>z3PluginLoader._find_plugin_legacy.<locals>.<genexpr>�s������"W�"W��q�v�]a�]q�Oq�Oq�vx�v}�wD�wD�EM�NO�NT�EU�EU�wV�wV�Oq�!�Oq�Oq�Oq�Oq�"W�"Wr0z	trying %sc3�X�K�|]$}tj��|��V��%dSr`)r8r9r=)r+r rAs  �r.rOz3PluginLoader._find_plugin_legacy.<locals>.<genexpr>�s3�����R�R�!�b�g�l�l�6�1�5�5�R�R�R�R�R�Rr0z Error accessing plugin paths: %sNc3�K�|]G}tj�|���!|�d���6t	|��V��HdS)s__init__.pyN)r8r9rr�rrs  r.rOz3PluginLoader._find_plugin_legacy.<locals>.<genexpr>�sQ����w�w�q�"�'�.�.�QR�BS�BS�w�\]�\f�\f�gu�\v�\v�w�i��l�l�w�w�w�w�w�wr0c3�B�K�|]}��|��V��dSr`)r�)r+r��	full_paths  �r.rOz3PluginLoader._find_plugin_legacy.<locals>.<genexpr>�s1�����K�K��y�)�)�!�,�,�K�K�K�K�K�Kr0rr�r5r6�_z�%s is kept for backwards compatibility but usage is discouraged. The module documentation details page may explain more about this rationale.zansible.builtin.{0}r)r+rr%r,z.{0} is not eligible for last-chance resolution)(rxr�rIr�r9rqrrrarsry�KeyErrorr�rr?r�rnr�r8�listdir�OSErrorr@rrG�anyr�r�splitext�
IndexErrorr^r��addr��islinkrt�lstripr�rr�r5r�)rbr,r%r,r9rF�
pull_cacher�r9ra�
full_paths�er0�	splitname�	base_namer�
alias_name�candidate_fqcrrArSs`                 @@r.rDz PluginLoader._find_plugin_legacy�s������(-��$��	0��<�#�#�D�$�/�/�D��,�V�4�
�
	� *�4� 0��7H�7M��4�7;��4�Rc�Rl�=t�=N�=N�rt��:�O`�Oi�2s�2D�t�2K�2K�os��.�+/��(�&�&���	�	�	��D�	����"W�"W�"W�"W�T�-I�-I�-K�-K�"W�"W�"W�4	�4	��$�)�D��d�^�^�F��M�M�+��,�-�-�-��-�4�4�T�:�:�:�(�1�H�
Q�R�R�R�R�r�z�&�?Q�?Q�R�R�R�
�
���
Q�
Q�
Q���� B�W�Q�Z�Z� O�P�P�P�P�P�P�P�P�����
Q����x�w�J�w�w�w�
k�
k�	��G�,�,�Y�7�7�	�
�K�K�K�K�a�6J�K�K�K�K�K����G�,�,�Y�7�7�	�%�a�L�	�#� )�!��I�I��!�#�#�#� "�I�I�I�#����$�I�6K�L�L�L�	��D�$;�B�$?�?�?�=N�y�Zb�=c�=c�D�+�B�/�	�:��D�$;�B�$?�?�?�=N�y�Zb�=c�=c�D�+�B�/�	�:��D�$;�I�$F�F�F�DU�V_�ai�Dj�Dj�D�+�I�6�y�A��D�$;�I�$F�F�F�DU�V_�ai�Dj�Dj�D�+�I�6�y�A��� �$�$�T�*�*�*�

�$.�t�$4�!�;L�;Q�#�8�;?�#�8�Vg�Vp�Ax�AR�AR�vx�#�>�Rc�Rl�5v�5G�$�5N�5N�rv�#�2�/3�#�,�*�*�*�*���
�
�
���
����
���s�#�#�	+��t��J��Z�'�'�$.�z�$:�!�(�J�����@Q�@V�1W�1W�J��&�&�(v�x|�yD�yD�EH�yI�yI�(I�J�J�J�;L�;Q�#�8�;E�#�8�Vg�Vp�Ax�AR�AR�vx�#�>�Xi�Xr�6C�5G�*�5T�5T�yC�#�2�/3�#�,�*�*�/�5�5�d�;�;���d�?�?�3�A�.�Q�Q�?��'�'��&�fy�N_�'�`�`�
`�"�'�'�(X�(_�(_�`d�(e�(e�f�f�fsO�AA=�=
B
�	B
� D&�&
E$�0*E�E$�#G,�,G;�:G;� AL)�)
L7�6L7c��	|�||���duS#t$r[}t|t��r�t�d�t|������Yd}~dSd}~wwxYw)z& Checks if a plugin named name exists �r:Nzhas_plugin error: {0})r<rJr)rr?r�r�r)rbr,r:rJs    r.�
has_pluginzPluginLoader.has_plugins���	G��#�#�D�/�#�J�J�RV�V�V���	G�	G�	G��"�l�+�+�
���M�M�1�8�8�����E�E�F�F�F�F�F�F�F�F�F�����		G���s��
B�AA;�;Bc�z�|�d��r|}nd�|j|g��}|tjvrtj|Stj��5tjdt��tj
�t|��t|����}tj
�
|��}|tj|<	|j�|��n#t $rtj|=�wxYw	ddd��n#1swxYwY|S)N�ansible_collections.r�ignore)r�r=r�rVrW�warnings�catch_warnings�simplefilter�RuntimeWarning�	importlib�util�spec_from_file_locationr�module_from_specr[�exec_modulerJ)rbr,r9r0�specr�s      r.�_load_module_sourcez PluginLoader._load_module_source"si���?�?�1�2�2�	7��I�I����$�,��!5�6�6�I����#�#��;�y�)�)�
�
$�
&�
&�	�	�
�!�(�N�;�;�;��>�9�9�)�I�:N�:N�PY�Z^�P_�P_�`�`�D��^�4�4�T�:�:�F�&,�C�K�	�"�
���'�'��/�/�/�/���
�
�
��K�	�*��
����0�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�"�
s+�(BD0�,D�D0�D � D0�0D4�7D4c�Z�t|d|��t|d|��t|d|pg��g}|r|�|��|r|�|ddd���|std|�����t|d|��t|d|d��dS)	N�_original_path�
_load_name�_redirected_namesr}zMissing FQCN for plugin source �ansible_aliases�ansible_namer)rNr�r�r)rbr-r,r9�redirected_namesrx�namess       r.�_update_objectzPluginLoader._update_objectAs���	��%�t�,�,�,���\�4�(�(�(���(�*:�*@�b�A�A�A����	#��L�L��"�"�"��	1��L�L�)�$�$�B�$�/�0�0�0��	I��G��G�G�H�H�H���&��.�.�.���^�U�1�X�.�.�.�.�.r0c�.�|j|g|�Ri|��jSr`)�get_with_contextr$)rbr,�args�kwargss    r.rIzPluginLoader.getTs(��$�t�$�T�;�D�;�;�;�F�;�;�B�Br0c	�2�d}|�dd��}|�dd��}||jvr
|j|}|�||���}|jr|jstd|��S|j}d|vrd�|j|f��}|j	}|j}	|j
pg}
|	|jvr |�||	��|j|	<d}|�
||j|	|	��t|j|	|j��}|jrst#|j|jg���}	t||j��}
n #t&$rtd|��cYSwxYwt)||
��std|��S|�|j||j|	||�	��|s�	t.�|��}|�|||	|
|��|j|g|�Ri|��|}nd#t6$rW}d
|jdvrBt:�d|�d
t?|������td|��cYd}~S�d}~wwxYw|�|||	|
|��t||��S)z9 instantiates a plugin of the given name using arguments T�
class_onlyFr:Nrfr��fromlist��found_in_cacher��abstractrzReturning not found on "z," as it has unimplemented abstract methods; ) �popr�r7rxrqr#r�r=rsrrrkr�rur�rUr�r�r�r��AttributeError�
issubclass�_display_plugin_loadr�r$�__new__r~rc�	TypeErrorr�r?�vr)rbr,r�r�r�r�r:r%r+r9r|r-r��plugin_class�instancer`s                r.r�zPluginLoader.get_with_contextWs0�����Z�Z��e�4�4�
� �*�*�%6��=�=���4�<����<��%�D�"�;�;�D�Ra�;�b�b��"�+�	F�3F�3[�	F�*�4�1D�E�E�E�%�3���g����h�h� 3� N�PW�X�Y�Y�G�"�7��"�7��.�<�B����t�)�)�)�'+�'?�'?��d�'K�'K�D��t�$�"�N����t�T�%7��%=�t�D�D�D��d�(��.���@�@���?�
	J� �����7H�I�I�I�F�
J�&�v�t��?�?����!�
J�
J�
J�.�t�5H�I�I�I�I�I�
J�����c�<�0�0�
J�.�t�5H�I�I�I�	
�!�!�$�/�4��9M�t�dr�@J�!�	K�	K�	K��
	�
�"�>�>�#�.�.���#�#�H�d�D�:J�G�T�T�T����X�7��7�7�7��7�7�7������
�
�
������*�*��I�I�I�lp�lp�lp�r{�|}�r~�r~�r~��A�A�A�2�4�9L�M�M�M�M�M�M�M�M������
����	
���C��t�-=�w�G�G�G�&�s�,?�@�@�@s8�E�E:�9E:�AH�
I-�AI(�!I-�'I(�(I-c� �tjr�d|�dtj�|���d|��}t|��dkr|�d|�|���d�}|s|r|�d|�d|�d�}t�|��d	Sd	S)
zd formats data to display debug info for plugin loading, also avoids processing unless really needed zLoading z 'z' from r�z (searched paths: r�z (found_in_cache=z
, class_only=N)	r��
DEFAULT_DEBUGr8r9rGr*r�r?r�)rbr�r,�searched_pathsr9r�r�rs        r.r�z!PluginLoader._display_plugin_load�s����?�		�		�1;���R�W�=M�=M�d�=S�=S�=S�=S�UY�UY�Z�C��>�"�"�Q�&�&�36�3�3��8I�8I�.�8Y�8Y�8Y�8Y�Z���
b��
b�AD���n�n�n�V`�V`�V`�a���M�M�#������		�		r0c
/�K�|�dd��}|�dd��}|�dd��}|r|rtd���g}d}t��}|���D]�}	t	jttj�|	jd������}
|	j	s|�
|
��|�t|
tjj
�������t��}|D�]}tj�|��d	}
tj�
|
��}|t|jvrt"�d
|z���y|dks|dkr)|jd
krt"�d|z����|r"||vrt"�d|z����|�|��|r|V���||jvr�|jdvr1d�t/t1|����|��}n|}	|�||��}nE#t4$r8}t"�d|�dt9|������Yd}~���d}~wwxYw||j|<d}n
|j|}|�|||��	t=||j��}nE#t@$r8}t"�d|�dt9|������Yd}~��d}~wwxYw|j!rVtE|j|j!g���}	t=||j!��}n#t@$rY��dwxYwtG||��s��z|�$|j||j%|||���|sN	||i|��}nD#tL$r7}t"�d|�dt9|������Yd}~nd}~wwxYw||vr|}nd|��}|�'||||���|V���dS)a
        Iterate through all plugins of this type, in configured paths (no collections)

        A plugin loader is initialized with a specific type.  This function is an iterator returning
        all of the plugins of that type to the caller.

        :kwarg path_only: If this is set to True, then we return the paths to where the plugins reside
            instead of an instance of the plugin.  This conflicts with class_only and both should
            not be set.
        :kwarg class_only: If this is set to True then we return the python class which implements
            a plugin rather than an instance of the plugin.  This conflicts with path_only and both
            should not be set.
        :kwarg _dedupe: By default, we only return one plugin per plugin name.  Deduplication happens
            in the same way as the :meth:`get` and :meth:`find_plugin` methods resolve which plugin
            should take precedence.  If this is set to False, then we return all of the plugins
            found, including those with duplicate names.  In the case of duplicates, the order in
            which they are returned is the one that would take precedence first, followed by the
            others  in decreasing precedence order.  This should only be used by subclasses which
            want to manage their own deduplication of the plugins.
        :*args: Any extra arguments are passed to each plugin when it is instantiated.
        :**kwargs: Any extra keyword arguments are passed to each plugin when it is instantiated.
        �_dedupeT�	path_onlyFr��HDo not set both path_only and class_only when calling PluginLoader.all()z*.pyr�rz+'%s' skipped due to a defined plugin filterrc�base�ansible.plugins.cachez!'%s' skipped due to reserved namez'%s' skipped as duplicate)�filter�testz{0}_{1}zSkipping plugin (z), cannot load: Nz) as it seems to be invalid: r�r�z ) as it seems to be incomplete: rM�rx)(r�rr�r�r�rr8r9r=ra�updater�r)rGrYrCr�r?r�r[r�r�r��abs�hashrurJr@rr�rUr�r�r�r�r�r�r�r�r~)rbr�r��deduper�r��all_matchesr��legacy_excluding_builtinr��matches�loaded_modulesr9r,rGr0r�r`r-r��fqcns                     r.rKzPluginLoader.all�s�����D���I�t�,�,���J�J�{�E�2�2�	��Z�Z��e�4�4�
��	k��	k��i�j�j�j�����#&�5�5� �!%�!=�!=�!?�!?�	F�	F���i�	�"�'�,�,�7H�7M�v�*V�*V� W� W�X�X�G�$�-�
9�(�/�/��8�8�8����v�g�2�7�3C�D�D�D�E�E�E�E������K	�K	�D��7�#�#�D�)�)�!�,�D��w�'�'��-�-�H��?�4�<�8�8�8��
�
�K�h�V�W�W�W���:�%�%�(�f�*<�*<���Qh�Ah�Ah��
�
�A�H�L�M�M�M���
�(�n�4�4��
�
�9�H�D�E�E�E�����x�(�(�(��
��
�
�
���4�-�-�-��9� 2�2�2�!*� 0� 0��T�$�Z�Z���(� K� K�I�I� (�I��!�5�5�i��F�F�F�F�� �����O�O�O�t�t�t�U\�]^�U_�U_�U_�$`�a�a�a��H�H�H�H���������,2��"�4�(�!&����+�D�1���"�"�8�V�T�:�:�:�
��f�d�o�6�6����!�
�
�
�����X\�X\�X\�^e�fg�^h�^h�^h� i�j�j�j����������
������

�$�D�L�D�O�;L�M�M�M���#*�6�4�?�#C�#C�L�L��%�����H�����!�#�|�4�4����%�%�d�o�x��AU�W[�lz�HR�%�
S�
S�
S��
r�r��#�t�.�v�.�.�C�C�� �r�r�r��O�O�O�_c�_c�_c�el�mn�eo�eo�eo�$p�q�q�q�q�q�q�q�q�����r�����/�/�/����4�(�4�4������X�t�d��C�C�C��I�I�I�I�WK	�K	sZ�I/�/
J1�9-J,�,J1�&K<�<
L>�-L9�9L>�%M;�;
N	�N	�O�
P�-P�P�NNr�r�r`�r�FFN)FFN)"rXrdre�__doc__rcr�r�r�r�r�r�r�r�r�r�r�r�r�r>rr5r<r7rgr>rDrg�__contains__rur~rIr�r�rKr(r0r.r*r*�se��������!%�!%�!%�!%�F�R�R��X�R�:�:�:�)�)�)� B�B�B�&
�
�
�$$�$�$�A�A�A����
#�
#�
#�
#�3�3�3�3�jT�T�T�T�c�c�c�.N�N�N�N�����>kk�kk�kk�kk�Z����#�#�#�#�<35��+0�$�\m�\m�\o�\o�Gm�Gm�Gm�Gm�Rig�ig�ig�ig�V	G�	G�	G�	G��L����>/�/�/�/�&C�C�C�;A�;A�;A�z����@�@�@�@�@r0r*c�v��eZdZdZd�fd�	Z�fd�Zd�fd�	Zed���Zd	�Z	�fd
�Z
d�Zd�Z�fd
�Z
�xZS)�Jinja2Loadera

    PluginLoader optimized for Jinja2 plugins

    The filter and test plugins are Jinja2 plugins encapsulated inside of our plugin format.
    We need to do a few things differently in the base class because of file == plugin
    assumptions and dedupe logic.
    Nc�r��tt|���||||||���g|_dS)N�r�r�)�superr�rc�_loaded_j2_file_maps)rbr�r�r�r<r�r��	__class__s       �r.rczJinja2Loader.__init__,sK���
�l�D�!�!�*�*�:�w���X_�vI�*�	J�	J�	J�$&��!�!�!r0c�d��tt|�����g|_dSr`)r�r�r�r�)rbr�s �r.r�zJinja2Loader._clear_caches1s-���
�l�D�!�!�/�/�1�1�1�$&��!�!�!r0r�Fc���tt|���|||||���}|s*|���}|�|d��}|S)N)r8r,r9r:)r�r�r<rKrI)	rbr,r8r,r9r:�plugin�all_pluginsr�s	        �r.r<zJinja2Loader.find_plugin5sk����|�T�*�*�6�6�t�h�bs�DQ�GV�7�X�X���	1��(�(�*�*�K� �_�_�T�4�0�0�F��
r0c�0�t|j��dzS)N�s)rr�r{s r.�method_map_namezJinja2Loader.method_map_nameCs�����0�0�3�6�6r0c��g}d�d|d|j|g��}	||jvr|�||��|j|<|j|}t	||j��}n7#t$r*}td|�d|�dt|�������d}~wwxYw|��}	|	�td|�d|�����	t	|	|j	��}
|
���
��}nN#t$rA}t�d|j�d	t|���d
|����|cYd}~Sd}~wwxYw|D]�\}}
d�||f��}d�||f��}|���}||
��}||vr�W|�||||���|�|����|S)Nr�ansible_collections�pluginszFailed to load z for rzCould not find z	Ignoring �
 plugins in '�' as it seems to be invalid: r�)r=r�r�rurUr�rJrUrr�r2r?r@r�_load_jinja2_classr~r�)rbr#rBr,r�r0r�r-r`�plugin_impl�
method_map�
plugin_map�	func_name�funcr+�full�pclassr�s                  r.�get_contained_pluginsz"Jinja2Loader.get_contained_pluginsGs1�����H�H�3�Z��D�I�W[�\�]�]�	�	e��$�"4�4�4�26�2J�2J�9�Va�2b�2b��"�;�/��'��4�F��&�$�/�2�2�C�C���	e�	e�	e��(�[�[�[�*�*�*�V_�`a�Vb�Vb�Vb�c�d�d�d�����	e�����c�e�e�����(�Z�Z�Z���F�G�G�G�	� ��d�.B�C�C�J�#����+�+�-�-�J�J���	�	�	��O�O�O�[_�[d�[d�[d�fm�ny�fz�fz�fz�fz�|}�|}�~�����N�N�N�N�N�N�����	���� *�	#�	#�O�I�t��h�h�
�I�6�7�7�G��8�8�Y�	�2�3�3�D��,�,�.�.�F��V�D�\�\�F��� � �������k�G��L�L�L��N�N�6�"�"�"�"��s6�A	A-�-
B!�7%B�B!�1C8�8
E�6D>�8E�>Ec��
��|�dd��}|�dd��}t��}|�d��}d|vr�|j|i|��D]s}|�|g��r[d|_||_|j|_|j	�
d��rdnd	|_|j	|_t||��cS�td}t|��\}	}
t��}	|	|vrt!d
|zd���|�|	��t%j|	|j��}|s"t+d�|	�����	t/|j��}
nB#t2$r5}t+d
�|	t5|�������d}~wwxYw|
�di���|ji���|
i��}|�d��}|r|�d��}|�d��}|�d��}|sd�|j|	��}t8�||||j���|�d��}|r�|�d��}|�d��}|�d��}|sd�|j|	��}t8�||||jd���}t?|���|�dd��}|r�t%j |��s+t!d|j�d|j�d|j!�d|�d�	���t||j���\}}
t8�"d�|j|j|j!|����|}	nn���	tG|j$��}n.#tJ$r!}t+t5|�����d}~wwxYw|j}|j&rd�||j&��}	tOj(|j)|dz� ��D�]{\}}}|r�
	tUtV|��j,|g|�Ri|��}n.#tZ$r!}t+t5|�����d}~wwxYw	t]|j/|j0��}|���1��}nV#tZ$rI}t8�2d!|j�d"tg|j/j���d#|����Yd}~��d}~wwxYw|D]�\} }!d�4|| f��}"d$|j�d%|j�d|j&�d| ��}#|	| |"fvrM|�5��}$|$|!��}|r,|j6}|�7||#|j/j|"�&��n����}n�#t>$r$}%t!t5|%��d|%�'���d}%~%wt t*f$r�tZ$r�}&t8�2d(�t5|&������t8�"d)�tq������t!t5|&��d|&�'���d}&~&wwxYwt||��S)*Nr�Fr:r~rTrMrLr�z*recursive collection redirect found for %rrzinvalid plugin name: {0}zInvalid plugin FQCN ({0}): {1}rr�r�rurvz{0} "{1}" is deprecated)r�r�r�rz{0} "{1}" has been removed)r�r�r�rr�rrrr)r#z&redirecting (type: {0}) {1}.{2} to {3}r)�prefix�	Skipping r�r�riz	.plugins.r�)�orig_excz>An unexpected error occurred during Jinja2 plugin loading: {0}z2Unexpected error during Jinja2 plugin loading: {0})9r�rgrErK�matches_namerxrrrwrqr{r�rsryr#�get_fqcr_and_namer�rr[r�try_parse_fqcrr�rUr�rr#rBrrIr?rtr$r
r�r�vvvrr&rr��pkgutil�iter_modules�__path__r�r�r�rJrUr$r�r2r@rr=r�r%r~r)(rbr,r�r�r�r:�context�known_pluginr�r��leaf_key�seenr	�tsr`�
routing_entry�deprecation_entryr�rurv�tombstone_entry�exc_msgr��next_keyr1�
parent_prefix�dummy�module_name�ispkgr�r�r�r�r�r+�src_namer��aprerJr�s(                                       �r.r�zJinja2Loader.get_with_contextls����Z�Z��e�4�4�
� �*�*�%6��=�=��#�%�%��� � �!2�3�3���d�?�?� (���$� 9�&� 9� 9�
J�
J���,�,�d�V�4�4�J�'+�G�$�37�G�0�3?�3N�G�0�NZ�Ng�Nr�Nr�tF�OG�OG�:O�9J�9J�MO�G�6�-9�-F�G�*�2�<��I�I�I�I�I�
J���)�$�/�/�
��X��u�u��;	��d�{�{�"�#O�RV�#V�XY�Z�Z�Z��H�H�S�M�M�M�&�5�c�4�9�E�E�C��
G��9�@�@��E�E�F�F�F�
[�-�c�n�=�=�����
[�
[�
[��?�F�F�s�I�VW�L�L�Y�Y�Z�Z�Z�����
[����
�F�F�#3�R�8�8�<�<�T�Y��K�K�O�O�PX�Z\�]�]�M�!.� 1� 1�-� @� @�� �
}�0�4�4�^�D�D��0�4�4�^�D�D��"3�"7�"7�8I�"J�"J��#�T�#<�#C�#C�D�I�s�#S�#S�L��"�"�<��|�mp�m{�"�|�|�|�,�/�/��<�<�O��
9�.�2�2�>�B�B��.�2�2�>�B�B��"1�"5�"5�6G�"H�"H��#�W�#?�#F�#F�t�y�RU�#V�#V�L�!�9�9�,�P_�fr�JM�.�bf�:�h�h��0��8�8�8�%�(�(��T�:�:�H��
�+�9�(�C�C��&�O�c�n�O�O�UX�Uc�O�O�fi�fr�O�O�v~�O�O�O����
&7�x�C�N�%[�%[�%[�"��(����D�K�K�D�I�WZ�We�gj�gs�u}�~�~��������w;	�z	)��� 9�:�:�C�C���	)�	)�	)��9�Q�<�<�(�(�(�����	)������
��;�	I�%�,�,�]�C�K�H�H�M�'	>�-4�-A�#�,�Wd�gj�Wj�-k�-k�-k�
"�
"�)��{�E����1�#M�%��d�";�";�"L�[�"j�[_�"j�"j�"j�ci�"j�"j�K�K�� �1�1�1�"�9�Q�<�<�0�0�0�����1�����!(��);�T�=Q�!R�!R�J�!+����!3�!3�!5�!5�J�J�� �����O�O�O�cg�cl�cl�cl�nu�wB�wI�wX�oY�oY�oY�oY�[\�[\�%]�^�^�^��H�H�H�H���������(2�"�"�O�I�t�!�h�h�
�y�'A�B�B�G�t�c�n�t�t�t�y�t�t�[^�[f�t�t�ir�t�t�H��y�'�2�2�2�!%�!8�!8�!:�!:��!'������!�"�&1�&E�G� �/�/���+�BT�Bc�nu�/�v�v�v�!�E���;
"��>)�	B�	B�	B��y�����D�A�A�A�A������h�'�	�	�	���	>�	>�	>��O�O�\�c�c�dm�np�dq�dq�r�r�s�s�s��K�K�L�S�S�T^�T`�T`�a�a�b�b�b��y��}�}�a�"�=�=�=�=�����	>����
'�v�w�7�7�7s��$E9�9
F8�0F3�3F8�0P�
P0�P+�+P0�(W9�$R+�*W9�+
S�5S�S�W9�6T�W9�
U$�?U�W9�U$�$BW9�9
[�X"�"[�B[�[c
/�8K�|�dd��}|�dd��}|r|rtd���t��}|j|i|��D�]�}t	||j��}	|��}nQ#t$rD}	t�d|j	�dt|j���d|	����Yd}	~	�md}	~	wwxYw|���D�]0}
|
t|jvrt�d|
z���5|
|vrt�d	|
z���W|r|j}n�|���}|||
��}|�|
��|
}
|j�d
��dkr5d
�|j�d
��dd���nd}|
�|��s|�d
|
��}
|�||
|j|
�
��|V���2���dS)Nr�Fr�r�r�r�r�z)%s skipped due to a defined plugin filterz%s skipped as duplicater�r�r�)r�rr��_j2_all_file_mapsrUr�rJr?�vvvvr�rrw�keysrCr�r�r�r[r{�countr=r�r�r~)rbr�r�r�r��found�p_map�plugins_listr�r`�plugin_namer;r�r�r#s               r.rKzJinja2Loader.all�s������J�J�{�E�2�2�	��Z�Z��e�4�4�
��	k��	k��i�j�j�j�����+�T�+�T�<�V�<�<� 	� 	�E�#�5�$�*>�?�?�L�
�&�,�.�.�����
�
�
�����\`�\e�\e�\e�gn�ot�pD�hE�hE�hE�hE�GH�GH�I�J�J�J����������
���� '�|�|�~�~�
�
���/�$�,�"?�?�?��M�M�"M�P[�"[�\�\�\���%�'�'��M�M�";�k�"I�J�J�J���b�"�1�F�F�"�4�4�6�6�F�#�V�G�K�$8�9�9�F��I�I�k�*�*�*�&�D�PU�Pb�Ph�Ph�il�Pm�Pm�qr�Pr�Pr����%�*<�*B�*B�3�*G�*G����*K�!L�!L�!L�xz�J�&�1�1�*�=�=�=�",�<�<�{�<�<���'�'���U�=Q�\`�'�a�a�a������-
� 	� 	s�6
B�
C�:C
�
Cc��dt|j�����z}t|j|g���}t||��S)z� override the normal method of plugin classname as these are used in the generic funciton
            to access the 'multimap' of filter/tests to function, this is a 'singular' plugin for
            each entry.
        zAnsibleJinja2%sr�)rr��
capitalizer�r�rU)rbr�r�s   r.r�zJinja2Loader._load_jinja2_class&sK��
'�)9�$�/�)J�)J�)U�)U�)W�)W�W�
��D�L�J�<�@�@�@���v�z�*�*�*r0c���|js7d|d<ttt|��j|i|����|_|jS)a�
        * Unlike other plugin types, file != plugin, a file can contain multiple plugins (of same type).
          This is why we do not deduplicate ansible file names at this point, we mostly care about
          the names of the actual jinja2 plugins which are inside of our files.
        * This method will NOT fetch collection plugin files, only those that would be expected under 'ansible.builtin/legacy'.
        Fr�)r�r�r�r�rK)rbr�r�r�s   �r.r�zJinja2Loader._j2_all_file_maps0sV����(�	]�!&�F�9��)-�-J�U�<��-F�-F�-J�D�-[�TZ�-[�-[�(\�(\�D�%��(�(r0r�r�)rXrdrer�rcr�r<r�r�r�r�rKr�r��
__classcell__)r�s@r.r�r�$s���������'�'�'�'�'�'�
'�'�'�'�'��������7�7��X�7�#�#�#�JJ8�J8�J8�J8�J8�X,�,�,�\+�+�+�)�)�)�)�)�)�)�)�)r0r�rLc�b�d|vr|}|dz|z}n|�d��d}|}||fS)Nrr})r�)rr#r,�fqcrs    r.r�r�DsH��
�(������C��(�*����~�~�c�"�"�2�&������:�r0c
��tt��}d}tj�d}ntj}d}tj�|���r�t|d��5}	t|�	����}n`#t$rS}t�d�
|t|������|cYd}~cddd��Sd}~wwxYw	ddd��n#1swxYwY	|d}n?#t$r2t�d�
|����|cYSwxYwt|��}|���}|dkry	t|�d	|d
����|d<n?#t$$r2t�d�
|����|cYSwxYw|d|d
<n]t�d�
|����n/|r-t�d�
|����d|dvr/t'd�
t)|�������|S)NFz/etc/ansible/plugin_filters.ymlT�rbz;The plugin filter file, {0} was not parsable. Skipping: {1}�filter_versionz2The plugin filter file, {0} was invalid. Skipping.z1.0zmodule_rejectlist)�module_blacklist�ansible.moduleszWUnable to parse the plugin filter file {0} as module_blacklist is not a list. Skipping.�ansible.plugins.actionz^The plugin filter file, {0} was a version not recognized by this version of Ansible. Skipping.z5The plugin filter file, {0} does not exist. Skipping.�statz�The stat module was specified in the module blacklist file, {0}, but Ansible will not function without the stat module.  Please remove stat from the blacklist.)r�	frozensetr��PLUGIN_FILTERS_CFGr8r9r'�openr�readrJr?r@r�rrU�striprIr�rr)�filters�user_set�
filter_cfgr �filter_datar`r�s       r.�_load_plugin_filterrOs���)�$�$�G��H���#�6�
�
��)�
���	�w�~�~�j�!�!�&>�
�*�d�
#�
#�	�q�
�'������1�1�����
�
�
����!2�28�&��W�Q�Z�Z�2P�2P�R�R�R�������
	�	�	�	�	�	�	�	�����
�����	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�!�"2�3�G�G���	�	�	��O�O�*�*0�&��*<�*<�
>�
>�
>��N�N�N�	�����'�"�"���-�-�/�/���f���
�-6�{���G[�]h�i{�]|�7}�7}�-~�-~��)�*�*���
�
�
����!.�.4�f�Z�.@�.@�B�B�B�����	
����
18�8I�0J�G�,�-�-��O�O�>�>D�f�Z�>P�>P�
R�
R�
R�
R��	>��O�O�*�*0�&��*<�*<�
>�
>�
>���*�+�+�+��2�28�&��:�9N�9N�2O�2O�Q�Q�	Q��Nsf�$C5�&!B�C5�
C%�<C �C%�C5� C%�%C5�5C9�<C9�D
�
9E�E�3,F � 9G�Gc�t�t�td�||������t	|��}	t|�dd��t��sqtj	�
d��}d�|t��}|dkrt�|��dS|dkrt|���dSdS#t$r�t$r9}t�d�||����Yd}~dSd}~wwxYw)	NzLoading collection {0} from {1}�requires_ansibler��'COLLECTIONS_ON_ANSIBLE_VERSION_MISMATCHz3Collection {0} does not support Ansible version {1}r@�errorzQError parsing collection metadata requires_ansible value from collection {0}: {1})r?r�rr�r�(_does_collection_support_ansible_versionrI�ansible_versionr�r��get_config_valuer@rrrJ)r��collection_pathr
�mismatch_behavior�messagerJs      r.�_on_collection_load_handlerr�s}���L�L��:�A�A�/�Sb�c�c�d�d�e�e�e�.��?�?�O�I�7��8K�8K�L^�`b�8c�8c�et�u�u�	H� !�� 9� 9�:c� d� d��K�R�R�Sb�ds�t�t�G� �I�-�-�����(�(�(�(�(�"�g�-�-�>�w�G�G�G�
	H�	H�
.�-������
��I�I�I����k�r�r�tC�EG�H�H�	I�	I�	I�	I�	I�	I�	I�	I�	I�����I���s�BC*�C*�*D7�>.D2�2D7c��|sdStst�d��dSt|��}t|��j}|�|��S)NTz_packaging Python module unavailable; unable to validate collection Ansible version requirements)r!r?r@r"�base_version�contains)�requirement_stringr	�ss�base_ansible_versions    r.rr�sc�����t������y�z�z�z��t�	�(�	)�	)�B�#�?�3�3�@��
�;�;�+�,�,�,r0c���tjrtjd��dSt	t
jt
j��}|���txj	tz
c_	dS)Nz3AnsibleCollectionFinder has already been configured)r�collection_finderrk�warnrr��COLLECTIONS_PATHS�COLLECTIONS_SCAN_SYS_PATH�_install�on_collection_loadr)�finders r.�_configure_collection_loaderr�se���0���
�K�L�L�L���
%�a�&9�1�;V�
W�
W�F�
�O�O�����.�.�2M�M�.�.�.�.r0�ModuleDocFragmentzansible.plugins.doc_fragments�
doc_fragments�ActionModuler��action_plugins�
ActionBase)r��CacheModuler��
cache_plugins�CallbackModulezansible.plugins.callback�callback_plugins�
Connectionzansible.plugins.connection�connection_plugins�paramiko�paramiko_ssh�ConnectionBaser��ShellModulezansible.plugins.shell�
shell_pluginsr�r��libraryzansible.module_utils�module_utils�LookupModulezansible.plugins.lookup�lookup_plugins�
LookupBase�FilterModulezansible.plugins.filter�filter_plugins�
TestModulezansible.plugins.test�test_plugins�StrategyModulezansible.plugins.strategy�strategy_plugins�StrategyBase�TerminalModulezansible.plugins.terminal�terminal_plugins�TerminalBase�
VarsModulezansible.plugins.vars�vars_plugins�Cliconfzansible.plugins.cliconf�cliconf_plugins�CliconfBase�Netconfzansible.plugins.netconf�netconf_plugins�NetconfBase�InventoryModulezansible.plugins.inventory�inventory_plugins�HttpApizansible.plugins.httpapi�httpapi_plugins�HttpApiBase�BecomeModulezansible.plugins.become�become_pluginsr�)rL)u�
__future__rrrr��
__metaclass__r�r8�os.pathr�rVrk�collectionsrr�	tracebackr�ansibler	r	r
r��ansible.errorsrrr
r�ansible.module_utils._textrrr�%ansible.module_utils.compat.importlibr�ansible.module_utils.sixr�ansible.parsing.utils.yamlr�ansible.parsing.yaml.loaderr�ansible.pluginsrrrr�ansible.utils.collection_loaderrr�2ansible.utils.collection_loader._collection_finderrr�ansible.utils.displayr�ansible.utils.plugin_docsrr �packaging.specifiersr!�packaging.versionr"r�importlib.utilror?r#r3rCrRr\r$r^rgr*r�r�rrrrrC�DOC_FRAGMENT_PLUGIN_PATHr��DEFAULT_ACTION_PLUGIN_PATH�
action_loader�DEFAULT_CACHE_PLUGIN_PATH�cache_loader�DEFAULT_CALLBACK_PLUGIN_PATH�callback_loader�DEFAULT_CONNECTION_PLUGIN_PATH�connection_loaderrH�DEFAULT_MODULE_PATH�
module_loader�DEFAULT_MODULE_UTILS_PATH�module_utils_loader�ps_module_utils_loader�DEFAULT_LOOKUP_PLUGIN_PATH�
lookup_loader�DEFAULT_FILTER_PLUGIN_PATH�
filter_loader�DEFAULT_TEST_PLUGIN_PATH�test_loader�DEFAULT_STRATEGY_PLUGIN_PATH�strategy_loader�DEFAULT_TERMINAL_PLUGIN_PATH�terminal_loader�DEFAULT_VARS_PLUGIN_PATH�vars_loader�DEFAULT_CLICONF_PLUGIN_PATH�cliconf_loader�DEFAULT_NETCONF_PLUGIN_PATH�netconf_loader�DEFAULT_INVENTORY_PLUGIN_PATH�inventory_loader�DEFAULT_HTTPAPI_PLUGIN_PATH�httpapi_loader�BECOME_PLUGIN_PATH�
become_loaderr(r0r.�<module>r�s���C�B�B�B�B�B�B�B�B�B��
�����	�	�	�	���������
�
�
�
�����/�/�/�/�/�/�/�/� � � � � � �2�2�2�2�2�2�"�"�"�"�"�"�L�L�L�L�L�L�L�L�L�L�L�L�C�C�C�C�C�C�C�C�C�C�?�?�?�?�?�?�1�1�1�1�1�1�0�0�0�0�0�0�5�5�5�5�5�5�Y�Y�Y�Y�Y�Y�Y�Y�Y�Y�Y�Y�Y�Y�Y�Y�Y�Y�Y�Y�q�q�q�q�q�q�q�q�)�)�)�)�)�)�H�H�H�H�H�H�H�H��1�1�1�1�1�1�)�)�)�)�)�)�)�������L��G�G�G���������
�'�)�)��$�*�%>��K`�@a�b�b��_�_�_�
r�
r�
r�����B5�5�5�!�!�!�!�!��!�!�!�O�O�O�O�O��O�O�O�d^
�^
�^
�^
�^
�^
�^
�^
�B])�])�])�])�])�<�])�])�])�@	����6�6�6�tI�I�I�&
-�
-�
-� 
N�
N�
N� &�%�'�'��������,��#����	�������� ��$����
��|������	����,����"��	���!�L�� ��$��
��(�(�
�����|�����	���������
�	��
�#�l������	���&�������	�������� ��$����
������ ��	��
��l������	����,����"��&������,����"��&������l������	�����
���!��%�������
���!��%����� �<����#��	�����
���!��%������������	��
�
�
s�B%�%	B1�0B1

Youez - 2016 - github.com/yon3zu
LinuXploit