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

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

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

���c���ddlmZmZmZeZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlmZmZmZddlmZddlmZmZddlmZddlmZddlmZdd	lmZ dd
l!m"Z"ddl#m$Z$m%Z%m&Z&ddl'm(Z(dd
l)m*Z*m+Z+ddl,m-Z-ddl.m/Z/ddl0m1Z1ddl2Z3ddl4Z3e/��Z5e1dgd���Z6dZ7dZ8dZ9dZ:dZ;dZ<dZ=dZ>e
j?�@e
j?�AeB��dd��ZCdZDdZEdZFd ZGd!�ZHejIreDZJneHeD��ZJe
j?�Ae
j?�Ae
j?�AeB������ZKe
jLd"e
jMeK��z��ZNe
jLd#��ZOe
jLd$��ZPGd%�d&ejQ��ZRd'�ZSeT��d(fd)�ZUGd*�d+��ZVGd,�d-eV��ZWGd.�d/eV��ZXd0�ZYd1�ZZd2�Z[d3�Z\	d9d4�Z]d5�Z^		d:d7�Z_d;d8�Z`dS)<�)�absolute_import�division�print_functionN)�AST�Import�
ImportFrom)�BytesIO)�__version__�
__author__)�	constants)�AnsibleError)�!InterpreterDiscoveryRequiredError)�module_manifest)�AnsibleJSONEncoder)�to_bytes�to_text�	to_native)�module_utils_loader)�_get_collection_metadata�_nested_dict_get)�action_write_locks)�Display)�
namedtuple�ModuleUtilsProcessEntry)�
name_parts�is_ambiguous�has_redirected_child�is_optionals"#<<INCLUDE_ANSIBLE_MODULE_COMMON>>s"<<ANSIBLE_VERSION>>"s)"<<INCLUDE_ANSIBLE_MODULE_COMPLEX_ARGS>>"s# POWERSHELL_COMMONs$<<INCLUDE_ANSIBLE_MODULE_JSON_ARGS>>s<<SELINUX_SPECIAL_FILESYSTEMS>>z# -*- coding: utf-8 -*-s# -*- coding: utf-8 -*-z..�module_utilsa�.%(shebang)s
%(coding)s
_ANSIBALLZ_WRAPPER = True # For test-module.py script to tell this is a ANSIBALLZ_WRAPPER
# This code is part of Ansible, but is an independent component.
# The code in this particular templatable string, and this templatable string
# only, is BSD licensed.  Modules which end up using this snippet, which is
# dynamically combined together by Ansible still belong to the author of the
# module, and they may assign their own license to the complete work.
#
# Copyright (c), James Cammarata, 2016
# Copyright (c), Toshio Kuratomi, 2016
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
#    * Redistributions of source code must retain the above copyright
#      notice, this list of conditions and the following disclaimer.
#    * Redistributions in binary form must reproduce the above copyright notice,
#      this list of conditions and the following disclaimer in the documentation
#      and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
def _ansiballz_main():
    import os
    import os.path

    # Access to the working directory is required by Python when using pipelining, as well as for the coverage module.
    # Some platforms, such as macOS, may not allow querying the working directory when using become to drop privileges.
    try:
        os.getcwd()
    except OSError:
        try:
            os.chdir(os.path.expanduser('~'))
        except OSError:
            os.chdir('/')

%(rlimit)s

    import sys
    import __main__

    # For some distros and python versions we pick up this script in the temporary
    # directory.  This leads to problems when the ansible module masks a python
    # library that another import needs.  We have not figured out what about the
    # specific distros and python versions causes this to behave differently.
    #
    # Tested distros:
    # Fedora23 with python3.4  Works
    # Ubuntu15.10 with python2.7  Works
    # Ubuntu15.10 with python3.4  Fails without this
    # Ubuntu16.04.1 with python3.5  Fails without this
    # To test on another platform:
    # * use the copy module (since this shadows the stdlib copy module)
    # * Turn off pipelining
    # * Make sure that the destination file does not exist
    # * ansible ubuntu16-test -m copy -a 'src=/etc/motd dest=/var/tmp/m'
    # This will traceback in shutil.  Looking at the complete traceback will show
    # that shutil is importing copy which finds the ansible module instead of the
    # stdlib module
    scriptdir = None
    try:
        scriptdir = os.path.dirname(os.path.realpath(__main__.__file__))
    except (AttributeError, OSError):
        # Some platforms don't set __file__ when reading from stdin
        # OSX raises OSError if using abspath() in a directory we don't have
        # permission to read (realpath calls abspath)
        pass

    # Strip cwd from sys.path to avoid potential permissions issues
    excludes = set(('', '.', scriptdir))
    sys.path = [p for p in sys.path if p not in excludes]

    import base64
    import runpy
    import shutil
    import tempfile
    import zipfile

    if sys.version_info < (3,):
        PY3 = False
    else:
        PY3 = True

    ZIPDATA = """%(zipdata)s"""

    # Note: temp_path isn't needed once we switch to zipimport
    def invoke_module(modlib_path, temp_path, json_params):
        # When installed via setuptools (including python setup.py install),
        # ansible may be installed with an easy-install.pth file.  That file
        # may load the system-wide install of ansible rather than the one in
        # the module.  sitecustomize is the only way to override that setting.
        z = zipfile.ZipFile(modlib_path, mode='a')

        # py3: modlib_path will be text, py2: it's bytes.  Need bytes at the end
        sitecustomize = u'import sys\nsys.path.insert(0,"%%s")\n' %%  modlib_path
        sitecustomize = sitecustomize.encode('utf-8')
        # Use a ZipInfo to work around zipfile limitation on hosts with
        # clocks set to a pre-1980 year (for instance, Raspberry Pi)
        zinfo = zipfile.ZipInfo()
        zinfo.filename = 'sitecustomize.py'
        zinfo.date_time = ( %(year)i, %(month)i, %(day)i, %(hour)i, %(minute)i, %(second)i)
        z.writestr(zinfo, sitecustomize)
        z.close()

        # Put the zipped up module_utils we got from the controller first in the python path so that we
        # can monkeypatch the right basic
        sys.path.insert(0, modlib_path)

        # Monkeypatch the parameters into basic
        from ansible.module_utils import basic
        basic._ANSIBLE_ARGS = json_params
%(coverage)s
        # Run the module!  By importing it as '__main__', it thinks it is executing as a script
        runpy.run_module(mod_name='%(module_fqn)s', init_globals=dict(_module_fqn='%(module_fqn)s', _modlib_path=modlib_path),
                         run_name='__main__', alter_sys=True)

        # Ansible modules must exit themselves
        print('{"msg": "New-style module did not handle its own exit", "failed": true}')
        sys.exit(1)

    def debug(command, zipped_mod, json_params):
        # The code here normally doesn't run.  It's only used for debugging on the
        # remote machine.
        #
        # The subcommands in this function make it easier to debug ansiballz
        # modules.  Here's the basic steps:
        #
        # Run ansible with the environment variable: ANSIBLE_KEEP_REMOTE_FILES=1 and -vvv
        # to save the module file remotely::
        #   $ ANSIBLE_KEEP_REMOTE_FILES=1 ansible host1 -m ping -a 'data=october' -vvv
        #
        # Part of the verbose output will tell you where on the remote machine the
        # module was written to::
        #   [...]
        #   <host1> SSH: EXEC ssh -C -q -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o
        #   PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o
        #   ControlPath=/home/badger/.ansible/cp/ansible-ssh-%%h-%%p-%%r -tt rhel7 '/bin/sh -c '"'"'LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8
        #   LC_MESSAGES=en_US.UTF-8 /usr/bin/python /home/badger/.ansible/tmp/ansible-tmp-1461173013.93-9076457629738/ping'"'"''
        #   [...]
        #
        # Login to the remote machine and run the module file via from the previous
        # step with the explode subcommand to extract the module payload into
        # source files::
        #   $ ssh host1
        #   $ /usr/bin/python /home/badger/.ansible/tmp/ansible-tmp-1461173013.93-9076457629738/ping explode
        #   Module expanded into:
        #   /home/badger/.ansible/tmp/ansible-tmp-1461173408.08-279692652635227/ansible
        #
        # You can now edit the source files to instrument the code or experiment with
        # different parameter values.  When you're ready to run the code you've modified
        # (instead of the code from the actual zipped module), use the execute subcommand like this::
        #   $ /usr/bin/python /home/badger/.ansible/tmp/ansible-tmp-1461173013.93-9076457629738/ping execute

        # Okay to use __file__ here because we're running from a kept file
        basedir = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'debug_dir')
        args_path = os.path.join(basedir, 'args')

        if command == 'explode':
            # transform the ZIPDATA into an exploded directory of code and then
            # print the path to the code.  This is an easy way for people to look
            # at the code on the remote machine for debugging it in that
            # environment
            z = zipfile.ZipFile(zipped_mod)
            for filename in z.namelist():
                if filename.startswith('/'):
                    raise Exception('Something wrong with this module zip file: should not contain absolute paths')

                dest_filename = os.path.join(basedir, filename)
                if dest_filename.endswith(os.path.sep) and not os.path.exists(dest_filename):
                    os.makedirs(dest_filename)
                else:
                    directory = os.path.dirname(dest_filename)
                    if not os.path.exists(directory):
                        os.makedirs(directory)
                    f = open(dest_filename, 'wb')
                    f.write(z.read(filename))
                    f.close()

            # write the args file
            f = open(args_path, 'wb')
            f.write(json_params)
            f.close()

            print('Module expanded into:')
            print('%%s' %% basedir)
            exitcode = 0

        elif command == 'execute':
            # Execute the exploded code instead of executing the module from the
            # embedded ZIPDATA.  This allows people to easily run their modified
            # code on the remote machine to see how changes will affect it.

            # Set pythonpath to the debug dir
            sys.path.insert(0, basedir)

            # read in the args file which the user may have modified
            with open(args_path, 'rb') as f:
                json_params = f.read()

            # Monkeypatch the parameters into basic
            from ansible.module_utils import basic
            basic._ANSIBLE_ARGS = json_params

            # Run the module!  By importing it as '__main__', it thinks it is executing as a script
            runpy.run_module(mod_name='%(module_fqn)s', init_globals=None, run_name='__main__', alter_sys=True)

            # Ansible modules must exit themselves
            print('{"msg": "New-style module did not handle its own exit", "failed": true}')
            sys.exit(1)

        else:
            print('WARNING: Unknown debug command.  Doing nothing.')
            exitcode = 0

        return exitcode

    #
    # See comments in the debug() method for information on debugging
    #

    ANSIBALLZ_PARAMS = %(params)s
    if PY3:
        ANSIBALLZ_PARAMS = ANSIBALLZ_PARAMS.encode('utf-8')
    try:
        # There's a race condition with the controller removing the
        # remote_tmpdir and this module executing under async.  So we cannot
        # store this in remote_tmpdir (use system tempdir instead)
        # Only need to use [ansible_module]_payload_ in the temp_path until we move to zipimport
        # (this helps ansible-test produce coverage stats)
        temp_path = tempfile.mkdtemp(prefix='ansible_%(ansible_module)s_payload_')

        zipped_mod = os.path.join(temp_path, 'ansible_%(ansible_module)s_payload.zip')

        with open(zipped_mod, 'wb') as modlib:
            modlib.write(base64.b64decode(ZIPDATA))

        if len(sys.argv) == 2:
            exitcode = debug(sys.argv[1], zipped_mod, ANSIBALLZ_PARAMS)
        else:
            # Note: temp_path isn't needed once we switch to zipimport
            invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
    finally:
        try:
            shutil.rmtree(temp_path)
        except (NameError, OSError):
            # tempdir creation probably failed
            pass
    sys.exit(exitcode)

if __name__ == '__main__':
    _ansiballz_main()
a
        os.environ['COVERAGE_FILE'] = '%(coverage_output)s=python-%%s=coverage' %% '.'.join(str(v) for v in sys.version_info[:2])

        import atexit

        try:
            import coverage
        except ImportError:
            print('{"msg": "Could not import `coverage` module.", "failed": true}')
            sys.exit(1)

        cov = coverage.Coverage(config_file='%(coverage_config)s')

        def atexit_coverage():
            cov.stop()
            cov.save()

        atexit.register(atexit_coverage)

        cov.start()
a�
        try:
            if PY3:
                import importlib.util
                if importlib.util.find_spec('coverage') is None:
                    raise ImportError
            else:
                import imp
                imp.find_module('coverage')
        except ImportError:
            print('{"msg": "Could not find `coverage` module.", "failed": true}')
            sys.exit(1)
a�
    import resource

    existing_soft, existing_hard = resource.getrlimit(resource.RLIMIT_NOFILE)

    # adjust soft limit subject to existing hard limit
    requested_soft = min(existing_hard, %(rlimit_nofile)d)

    if requested_soft != existing_soft:
        try:
            resource.setrlimit(resource.RLIMIT_NOFILE, (requested_soft, existing_hard))
        except ValueError:
            # some platforms (eg macOS) lie about their hard limit
            pass
c���g}|���D]C}|���}|r|�d��r�.|�|���Dd�|��S)N�#�
)�
splitlines�strip�
startswith�append�join)�source�buf�line�ls    �C/usr/lib/python3.11/site-packages/ansible/executor/module_common.py�_strip_commentsr-�sr��
�C��!�!�#�#�����J�J�L�L���	�A�L�L��&�&�	���
�
�4������:�:�c�?�?��z*%s/(?P<path>ansible/modules/.*)\.(py|ps1)$zH/(?P<path>ansible_collections/[^/]+/[^/]+/plugins/modules/.*)\.(py|ps1)$s�(?:from +\.{2,} *module_utils.* +import |from +ansible_collections\.[^.]+\.[^.]+\.plugins\.module_utils.* +import |import +ansible_collections\.[^.]+\.[^.]+\.plugins\.module_utils.*|from +ansible\.module_utils.* +import |import +ansible\.module_utils\.)c�6��eZdZd�fd�	Zd�ZeZd�Zd�Z�xZS)�ModuleDepFinderFc�&��tt|��j|i|��||_t	��|_t	��|_||_||_t|j
t|ji|_
|�|��dS)a�
        Walk the ast tree for the python module.
        :arg module_fqn: The fully qualified name to reach this module in dotted notation.
            example: ansible.module_utils.basic
        :arg is_pkg_init: Inform the finder it's looking at a package init (eg __init__.py) to allow
            relative import expansion to use the proper package level without having imported it locally first.

        Save submodule[.submoduleN][.identifier] into self.submodules
        when they are from ansible.module_utils or ansible_collections packages

        self.submodules will end up with tuples like:
          - ('ansible', 'module_utils', 'basic',)
          - ('ansible', 'module_utils', 'urls', 'fetch_url')
          - ('ansible', 'module_utils', 'database', 'postgres')
          - ('ansible', 'module_utils', 'database', 'postgres', 'quote')
          - ('ansible', 'module_utils', 'database', 'postgres', 'quote')
          - ('ansible_collections', 'my_ns', 'my_col', 'plugins', 'module_utils', 'foo')

        It's up to calling code to determine whether the final element of the
        tuple are module names or something else (function, class, or variable names)
        .. seealso:: :python3:class:`ast.NodeVisitor`
        N)�superr0�__init__�_tree�set�
submodules�optional_imports�
module_fqn�is_pkg_initr�visit_Importr�visit_ImportFrom�
_visit_map�visit)�selfr8�treer9�args�kwargs�	__class__s      �r,r3zModuleDepFinder.__init__�s����.	.��o�t�$�$�-�t�>�v�>�>�>���
��%�%��� #�����$���&���
�D�%���-�
���
	
�
�
�4�����r.c�>�|j}|j}tj|��D]y\}}t	|t
��r_|D]\}t	|ttf��r||_||j	|���<t	|t��r||���]�zdS)z�Overridden ``generic_visit`` that makes some assumptions about our
        use case, and improves performance by calling visitors directly instead
        of calling ``visit`` to offload calling visitors.
        N)�
generic_visitr<�ast�iter_fields�
isinstance�listrr�parentrBr)r>�noderD�	visit_map�field�value�items       r,rDzModuleDepFinder.generic_visit�s���
�*�
��O�	��O�D�1�1�	,�	,�L�E�5��%��&�&�
,�!�,�,�D�!�$���(<�=�=�,�&*���1�	�$�.�1�$�7�7�7�7�#�D�#�.�.�,�%�
�d�+�+�+���	,�	,r.c��|jD]�}|j�d��s|j�d��rkt|j�d����}|j�|��|j|jkr|j	�|����|�
|��dS)z�
        Handle import ansible.module_utils.MODLIB[.MODLIBn] [as asname]

        We save these as interesting submodules when the imported library is in ansible.module_utils
        or ansible.collections
        zansible.module_utils.�ansible_collections.�.N)�names�namer%�tuple�splitr6�addrIr4r7rD)r>rJ�alias�py_mods    r,r:zModuleDepFinder.visit_Import�s����Z�	6�	6�E��
�%�%�&=�>�>�
6��J�)�)�*@�A�A�
6��u�z�/�/��4�4�5�5����#�#�F�+�+�+��;�$�*�,�,��)�-�-�f�5�5�5�����4� � � � � r.c���|jdkr�|jr
|jdzpdn|j}|jrst|j�d����}|jr'd�|d|�|jfz��}n-d�|d|���}n|j}n|j}d}|jdjdkr|j	�
d��n�|�d��r#t|�d����}nR|�d��r=|�d	��sd
|vr#t|�d����}n	|r`|jD]X}|j	�
||jfz��|j
|jkr#|j�
||jfz���Y|�|��dS)a	
        Handle from ansible.module_utils.MODLIB import [.MODLIBn] [as asname]

        Also has to handle relative imports

        We save these as interesting submodules when the imported library is in ansible.module_utils
        or ansible.collections
        r�NrQ�_six)r[zansible.module_utilsrPzplugins.module_utilsz.plugins.module_utils.)�levelr9r8rTrU�moduler'rRrSr6rVr%�endswithrIr4r7rD)r>rJ�level_slice_offset�parts�node_modulerXrWs       r,r;z ModuleDepFinder.visit_ImportFrom�s���:��>�>�<@�<L�!]�$�*��q��!8�D��SW�S]�R]����

*��d�o�3�3�C�8�8�9�9���;�G�"%�(�(�5�1D�2D�1D�+E����+V�"W�"W�K�K�#&�(�(�5�1D�2D�1D�+E�"F�"F�K�K�#�k����+�K����:�a�=���'�'��O���	�*�*�*�*�
�
#�
#�$:�
;�
;�	�
�;�,�,�S�1�1�2�2�F�F�
�
#�
#�$:�
;�
;�
	��#�#�$:�;�;�	
�?W�[f�?f�?f�
�{�0�0��5�5�6�6�����	F���
F�
F����#�#�F�e�j�]�$:�;�;�;��;�$�*�,�,��)�-�-�f��
�}�.D�E�E�E�����4� � � � � r.�F)	�__name__�
__module__�__qualname__r3rDr=r:r;�
__classcell__�rBs@r,r0r0�sr�������#�#�#�#�#�#�J,�,�,� 
�E�!�!�!�"?!�?!�?!�?!�?!�?!�?!r.r0c��tj�|��s/tdtj�|��z���t|d��5}|���}ddd��n#1swxYwY|S)Nz1imported module support code does not exist at %s�rb)�os�path�existsr
�abspath�open�read)rk�fd�datas   r,�_slurprrAs���
�7�>�>�$���h��N�QS�QX�Q`�Q`�ae�Qf�Qf�f�g�g�g�	
�d�D�	�	��R��w�w�y�y���������������������Ks�B�B�BFc�$�tj�|�����}d|z}d|���z}d}|dkr�|r	|d}n�t
j�|��r�t
j�||���}	|�	|	�����}|r|dvr9d|z}
|�
d	i��}|
|vrtd
||����||
}nPtd|d
����||vr:|�	|�
|�������}|s|}d�|��}|r|dzd�
|��z}||fS)za
      Handles the different ways ansible allows overriding the shebang target for a module.
    zansible_%s_interpreterzINTERPRETER_%sN�python�ansible_playbook_python��	variables)�auto�auto_legacy�auto_silent�auto_legacy_silentzdiscovered_interpreter_%s�
ansible_factszinterpreter discovery needed)�interpreter_name�discovery_modezinterpreter discovery requiredryz#!{0}� )rjrk�basenamer$�upper�C�config�get_configuration_definition�get_config_value�template�getr�formatr')
�interpreter�	task_vars�templarr@�remote_is_localr}�interpreter_config�interpreter_config_key�interpreter_out�interpreter_from_config�discovered_interpreter_config�facts_from_task_vars�shebangs
             r,�_get_shebangr�Is����w�'�'��4�4�:�:�<�<��3�5E�E��-�0@�0F�0F�0H�0H�H���O��8�#�#��	W�'�(A�B�O�O��X�
2�
2�3I�
J�
J�	W�&'�h�&?�&?�@V�bk�&?�&l�&l�#�%�.�.�/F�/L�/L�/N�/N�O�O�O�#�	
Z�o�9u�&u�&u�0L�O_�0_�-�'0�}�}�_�b�'I�'I�$�0�8L�L�L�;�<Z�m}�O^�_�_�_�_�&:�;X�&Y�O��3�4T�gw�IV�W�W�W�
W�	�y�	(�	(�!�*�*�9�=�=�9K�+L�+L�+R�+R�+T�+T�U�U���&�%���o�o�o�.�.�G��3��D�.�4�9�9�T�?�?�2���O�#�#r.c�R�eZdZdd�Zed���Zd�Zd�Zd�Zd�Z	d
d	�Z
d
�ZdS)�ModuleUtilLocatorBaseFc��||_||_||_d|_d|_||_d|_d|_d|_d|_	|r9t|�|����dkr||dd�g|_dS|g|_dS)NF�rZ���)
�
_is_ambiguous�_child_is_redirected�_is_optional�found�
redirected�
fq_name_parts�source_code�output_path�
is_package�_collection_name�len�!_get_module_utils_remainder_parts�candidate_names)r>r�r�child_is_redirectedrs     r,r3zModuleUtilLocatorBase.__init__�s���)���%8��!�'�����
����*������������ $����	3�C�� F� F�}� U� U�V�V�YZ�Z�Z�$1�=��"��3E�#F�D� � � �$1�?�D� � � r.c�$�d�|jD��S)Nc�8�g|]}d�|����S)rQ)r')�.0�ns  r,�
<listcomp>z@ModuleUtilLocatorBase.candidate_names_joined.<locals>.<listcomp>�s"��:�:�:��������:�:�:r.)r�)r>s r,�candidate_names_joinedz,ModuleUtilLocatorBase.candidate_names_joined�s��:�:�T�%9�:�:�:�:r.c
�r�|�|��}|sdS	t|j��}nh#t$r[}|jrYd}~dStd�d�|��|jt|�������d}~wwxYwt|ddd�|��g��}|sdS|�
d��}|du}|s|�
d��}|r�|�
d��}|�
d	��}	|�
d
��}
d�d�|����}|
r|d�|
��z
}n|dz
}t�||	|||j��d
|v�rd|_
d�|��}d|_|d
}
|
�d��s�|
�d��}t#|��dkr#t%d�||
�����d�|d|dd�|dd�����}
t�d�||
����|�||
��|_dSdS)NFzGerror processing module_util {0} loading redirected collection {1}: {2}rQ�plugin_routingr�	tombstone�deprecation�removal_date�removal_version�warning_textz module_util {0} has been removedz ({0})�redirectT�ansible_collections�zinvalid redirect for {0}: {1}z4ansible_collections.{0}.{1}.plugins.module_utils.{2}rrZ�z"redirecting module_util {0} to {1})r�rr��
ValueErrorr�r
r�r'rrr��display�
deprecatedr�r�r%rUr��	Exception�vvv�_generate_redirect_shim_sourcer�)r>r�module_utils_relative_parts�collection_metadata�ve�
routing_entry�	dep_or_ts�removedr�r�r��msg�
source_pkg�redirect_target_pkg�
split_fqcns               r,�_handle_redirectz&ModuleUtilLocatorBase._handle_redirect�s���&*�&L�&L�Z�&X�&X�#�+�	��5�	d�":�4�;P�"Q�"Q�����	d�	d�	d�� �
��u�u�u�u�u��h� &��s�x�x�
�';�';�T�=R�T]�^`�Ta�Ta� b� b�d�d�
d�����	d����)�)<�?O�Q_�ad�ai�ai�kF�bG�bG�?H�I�I�
��	��5�"�%�%�k�2�2�	��4�'���	9�%�)�)�-�8�8�I��	c�$�=�=��8�8�L�'�m�m�,=�>�>�O�$�=�=��8�8�L�4�;�;�C�H�H�Z�<P�<P�Q�Q�C��
��x���|�4�4�4����s�
�����s�O�W�l�D�La�b�b�b���&�&�"�D�O����*�-�-�J�"�D�O�"/�
�";��'�1�1�2G�H�H�	
�0�6�6�s�;�;�
��z�?�?�Q�&�&�#�$C�$J�$J�:�Wj�$k�$k�l�l�l�&\�&c�&c��q�M��q�M��H�H�Z����^�,�,�'�'�#�

�K�K�<�C�C�J�Pc�d�d�e�e�e�#�B�B�:�Ob�c�c�D���4��us�0�
B�B�A	B�Bc��gS)N��r>rs  r,r�z7ModuleUtilLocatorBase._get_module_utils_remainder_parts�s���	r.c�R�d�|�|����S)NrQ)r'r�r�s  r,�_get_module_utils_remainderz1ModuleUtilLocatorBase._get_module_utils_remainder�s"���x�x��>�>�z�J�J�K�K�Kr.c��dS)NFr�r�s  r,�_find_modulez"ModuleUtilLocatorBase._find_module�s���ur.Tc�L�|jD]K}|r|�|��rnI|�|��rn2|s|�|��rn�L|jrd|_d|_ndS|jr|dz}n|}d|_tjj	|�dz|_
||_dS)NTr�)r3�.py)r�r�r�r�r�r�r�rjrkr'r�r�)r>�redirect_first�candidate_name_parts�
path_partss    r,�_locatezModuleUtilLocatorBase._locate�s���$(�$8�	�	� ��
�$�"7�"7�8L�"M�"M�
���� � �!5�6�6�
���!�
�d�&;�&;�<P�&Q�&Q�
�����(�
�"&���#%�� � ����?�	.�-�
�=�J�J�-�J���
��7�<��4�u�<���1����r.c�.�d�||��S)Nz8
import sys
import {1} as mod

sys.modules['{0}'] = mod
)r�)r>�fq_source_module�fq_target_modules   r,r�z4ModuleUtilLocatorBase._generate_redirect_shim_source�s���
�F��-�.�.�	/r.N�FFF)T)rcrdrer3�propertyr�r�r�r�r�r�r�r�r.r,r�r��s�������3�3�3�3�*�;�;��X�;�9�9�9�v���L�L�L����2�2�2�2�4/�/�/�/�/r.r�c�,��eZdZd�fd�	Zd�Zd�Z�xZS)�LegacyModuleUtilLocatorFNc�0��tt|���|||��|dd�dkr"td�|�����|ddkr
d}|g|_||_d|_|�d�	��dS)
Nrr���ansiblerz=this class can only locate from ansible.module_utils, got {0}�six)r�rr�zansible.builtinF)r�)	r2r�r3r�r�r��	_mu_pathsr�r�)r>r�r�mu_pathsr�rBs     �r,r3z LegacyModuleUtilLocator.__init__s����
�%�t�,�,�5�5�m�\�Sf�g�g�g���1���!<�<�<��[�b�b�cp�q�q�r�r�r����u�$�$�?�M�$1�?�D� �!��� 1������E��*�*�*�*�*r.c��|dd�S)Nr�r�r�s  r,r�z9LegacyModuleUtilLocator._get_module_utils_remainder_parts����!�"�"�~�r.c���|�|���t���dkr|j}n�fd�|jD��}tjj�d�|��|��x|_}|�btj
�|j��dtjj
vr'|j�d��|_|j}ndSt!|��|_dS)NrZc�N��g|]!}tjj|g�dd��R���"S)Nr�)rjrkr')r��p�rel_name_partss  �r,r�z8LegacyModuleUtilLocator._find_module.<locals>.<listcomp>"sB���%�%�%�q�R�W�\�!�:�n�S�b�S�&9�:�:�:�%�%�%r.rQ�/__init__.pyFT)r�r�r��	importlib�	machinery�
PathFinder�	find_specr'�_inforjrk�splitext�origin�SOURCE_SUFFIXESr^r�rrr�)r>r�paths�inforkr�s     @r,r�z$LegacyModuleUtilLocator._find_modules�����?�?�
�K�K���~���!�#�#��N�E�E�%�%�%�%��^�%�%�%�E�&�/�:�D�D�S�X�X�j�EY�EY�[`�a�a�a��
�T����� 0� 0��� =� =�a� @�I�DW�Dg� g� g�"�k�2�2�>�B�B�D�O��;�D�D��5�!�$�<�<����tr.)FNF)rcrdrer3r�r�rfrgs@r,r�r�s[�������+�+�+�+�+�+� ���������r.r�c�,��eZdZd�fd�	Zd�Zd�Z�xZS)�CollectionModuleUtilLocatorFc���tt|���||||��|ddkr"td�|�����t|��dkr0|dd�dkr"td�|�����d	�|d
d���|_|���dS)Nrr�zMCollectionModuleUtilLocator can only locate from ansible_collections, got {0}�r��)�pluginsrzoCollectionModuleUtilLocator can only locate below ansible_collections.(ns).(coll).plugins.module_utils, got {0}rQrZ)	r2r�r3r�r�r�r'r�r�)r>r�rr�rrBs     �r,r3z$CollectionModuleUtilLocator.__init__2s����
�)�4�0�0�9�9�-��Wj�lw�x�x�x����4�4�4��k�r�r�tA�B�B�C�C�
C�
��
�
�1�
$�
$��q��s�);�?Z�)Z�)Z��N�#�V�M�2�2�4�4�
4�!$����q��s�);� <� <����������r.c	��t|��dkrd|_d|_dSd�|dd���}t	jj|dd��}d}	t
j|ttj�|d������}n#t$rYnwxYw|�d|_n7	t
j|t|dz����}n#t$rYnwxYw|�d	S||_dS)
Nr�r�TrQrr�z__init__.pyr�F)
r�r�r�r'rjrk�pkgutil�get_datar�ImportError)r>r�collection_pkg_name�resource_base_path�srcs     r,r�z(CollectionModuleUtilLocator._find_module?s'���z�?�?�Q���!�D��"�D�O��4�"�h�h�z�!�A�#��7�7���W�\�:�a�b�b�>�:����	��"�#6�	�"�'�,�,�Oa�cp�Bq�Bq�8r�8r�s�s�C�C���	�	�	��D�	����
�?�"�D�O�O�
��&�':�I�FX�[`�F`�<a�<a�b�b�����
�
�
���
�����;��5�����ts%�AB � 
B-�,B-�;%C!�!
C.�-C.c��|dd�S)Nr�r�r�s  r,r�z=CollectionModuleUtilLocator._get_module_utils_remainder_partser�r.r�)rcrdrer3r�r�rfrgs@r,r�r�1s\�������������$�$�$�L������r.r�c	�����dtt��zdztt��zdzdfdd��d�tjd�	��D��}|�t��	t|d
dtj	��}n3#ttf$r}td|�d
|j
�����d}~wwxYwt||����fd��jD��}|�t!dddd�����|�r|���|�d��\}}	}
}|�vr�6|dd�dkrt'||	||
���}n?|ddkrt)||	|
|���}nt*�d|gz����|js-|r��d�||j��}
t|
���|j�vr��	t|jd
dtj	��}n8#ttf$r$}td|j�d
|j
�����d}~wwxYwtd�|j��||j���|���fd��jD����|j|jf�|j<g}|jdd�D]U}|�|��tA|��}|�vr+|�t!|d|j!|������V|���D]`}�|d}|�"|�|d��tG|d���}t*�$d |z���adS)!a�
    Using ModuleDepFinder, make sure we have all of the module_utils files that
    the module and its module_utils files needs. (no longer actually recursive)
    :arg name: Name of the python module we're examining
    :arg module_fqn: Fully qualified name of the python module we're scanning
    :arg module_data: string Python code of the module we're scanning
    :arg zf: An open :python:class:`zipfile.ZipFile` object that holds the Ansible module payload
        which we're assembling
    sUfrom pkgutil import extend_path
__path__=extend_path(__path__,__name__)
__version__="s"
__author__="s"
zansible/__init__.py)sHfrom pkgutil import extend_path
__path__=extend_path(__path__,__name__)
z ansible/module_utils/__init__.py))r�r�c�P�g|]#}tj�|���!|��$Sr�)rjrk�isdir)r�r�s  r,r�z$recursive_finder.<locals>.<listcomp>�s0��g�g�g��VX�V]�Vc�Vc�de�Vf�Vf�g�!�g�g�gr.F)�subdirsz	<unknown>�execzUnable to import z due to Nc	�D��g|]}t|dd|�jv�����S)TF�r�rr7)r��m�finders  �r,r�z$recursive_finder.<locals>.<listcomp>�sG���H�H�H�pq�1�!�T�5�a�SY�Sj�Nj�k�k�k�H�H�Hr.)r�r�basicr	rr�r�)rr�r�r�)rr�rz=ModuleDepFinder improperly found a non-module_utils import %szFCould not find imported module support code for {0}.  Looked for ({1})rQc3�T�K�|]"}|�v�t|dd|�jv���V��#dS)TFr	Nr
)r�rr�py_module_caches  ��r,�	<genexpr>z#recursive_finder.<locals>.<genexpr>�sX�����"Z�"Z�&'���@X�@X�#:�!�T�5�VW�[a�[r�Vr�"s�"s�"s�@X�@X�@X�@X�"Z�"Zr.r�rZ�surrogate_or_strict��errorszIncluding module_utils file %s)%rr
rr�
_get_pathsr&�_MODULE_UTILS_PATH�compilerE�
PyCF_ONLY_AST�SyntaxError�IndentationErrorr
r�r0r6r�sort�popr�r�r��warningr�r�r�r�r�r'r��extendr�rTr��writestrr�vvvvv)rSr8�module_data�zf�module_utils_pathsr?�e�modules_to_process�py_module_namerr�r�module_infor��accumulated_pkg_name�pkg�normalized_name�py_module_file_name�mu_filerrs                   @@r,�recursive_finderr,is�����&
�'��4�4�
5�
�
�"*�*�!5�!5�
6�9?�
?�
"�#�&0�
1�
1�O�h�g�%8�%C�E�%R�%R�%R�g�g�g�����0�1�1�1�L��{�K���9J�K�K�����)�*�L�L�L��l�d�d�d�A�E�E�J�K�K�K�����L�����Z��
.�
.�F�H�H�H�H�u{�vG�H�H�H�����5�6Z�\a�ch�v{�|�|�|�}�}�}��5L����!�!�!�I[�I_�I_�`a�Ib�Ib�F���&9�;��_�,�,���!�A�#��"=�=�=�1�.�|�;M�cv�x�x�x�K�K�
�A�
�"7�
7�
7�5�n�S_�J]�kv�x�x�x�K�K�
�O�O�[�-�.�/�
0�
0�
0��� �	$��
��Z�a�a�bl�ny�oQ�R�R�C��s�#�#�#��$��7�7��	e��;�2�K���IZ�[�[�D�D���-�.�	e�	e�	e��,�+�B[�B[�B[�]^�]b�]b�c�d�d�d�����	e����!����+�*C�!D�!D�d�K�Lb�c�c���!�!�"Z�"Z�"Z�"Z�"Z�+1�+<�"Z�"Z�"Z�	Z�	Z�	Z�7B�6M�{�Of�5g���1�2� "���,�S�b�S�1�	L�	L�C� �'�'��,�,�,�#�$8�9�9�O��o�5�5�"�)�)�*A�/�SX�Ze�Zp�J�+K�+K�+K�L�L�L��k�5L�n*�B�B��-�n�=�a�@��
���'���)H��)K�L�L�L��-�6K�L�L�L���
�
�6��@�A�A�A�A�B�Bs0�4B�C�"B<�<C�#!H�H:�H5�5H:c	��ttgd���ttdd����tdg��z
z��}|dd�}t|�d|����S)N)���	�
��
�� ��i)�	bytearrayr5�range�bool�	translate)�
b_module_data�	textchars�starts   r,�
_is_binaryr?�sq���#�7�7�7�8�8�3�u�T�5�?Q�?Q�;R�;R�UX�Z^�Y_�U`�U`�;`�`�a�a�I��%�4�%� �E������i�0�0�1�1�1r.c�:�d}t�|��}|st�|��}|rQ|�d��}d|vrt	d���d�|�d����}nt	d���|S)ap
    Get the fully qualified name for an ansible module based on its pathname

    remote_module_fqn is the fully qualified name.  Like ansible.modules.system.ping
    Or ansible_collections.Namespace.Collection_name.plugins.modules.ping
    .. warning:: This function is for ansible modules only.  It won't work for other things
        (non-module plugins, etc)
    NrkrQz7Module name (or path) was not a valid python identifier�/z1Unable to determine module's fully qualified name)�CORE_LIBRARY_PATH_RE�search�COLLECTION_PATH_RE�groupr�r'rU)�module_path�remote_module_fqn�matchrks    r,�_get_ansible_module_fqnrI�s�����
!�'�'��4�4�E��7�"�)�)�+�6�6��
�
N��{�{�6�"�"���$�;�;��V�W�W�W��H�H�T�Z�Z��_�_�5�5����L�M�M�M��r.c���|�d��}d�|��dz}|�||��|ddkrd}t��}n#d}t|�����}t|t
|����D]=}d�|d|���d	z}||vr�'|�|d
���>dS)zKAdd a module from ansible or from an ansible collection into the module ziprQrAr�rr�r�rZNr�r.)rUr'r�	frozenset�namelistr9r�)	r!rGr<�module_path_partsrFr>�existing_paths�idx�package_paths	         r,�_add_module_to_ziprQ�s���)�/�/��4�4���(�(�,�-�-��5�K��K�K��]�+�+�+����y�(�(���"�������"�2�;�;�=�=�1�1���U�C� 1�2�2�3�3�'�'���x�x� 1�$�3�$� 7�8�8�>�I���>�)�)��	���L�#�&�&�&�&�'�'r.c���dx}}t|��rdx}}�n-t|vr!d}d}|�td��}�nt�|��rd}d}n�t
|vr d}d}|�t
d��}n�t
jd|tj��s�t
jd	|tj��s`t
jd
|tj��s@t
jd|tj��s t
jd|tj��rd}d}nt|vrd}d
}nd|vrdx}}d}|dvr|||fSt��}	t|��}n/#t$r"t�
d��d|z}YnwxYw|dk�rRt|���}	tt!j|t$d�����}n1#t&$r$}t)dt+|��z���d}~wwxYw	t-t.|��}n9#t0$r,t�d|z��t.j}YnwxYwt6j�t<jd��}t6j�||�d|����}d}t6j� |��r[t�
d|z��tC|d��5}|�"��}ddd��n#1swxYwY�n#|tFj#vr0t�
d|z��tFj#|}n/t�
d|z��tFj#d}t�
d��|5t�
d tI|��z��t6j� |���s�t�
d!��t��}t/j%|d"|�#��}tM||||��t�
d$��tO|||��|�(��tSj*|�+����}t6j� |��sF	t7j,|��n0#tZ$r#t6j� |��s�YnwxYwt�
d%��tC|d&zd'��5}|�.|��ddd��n#1swxYwYt�
d(��t7j/|d&z|��t�
d)��ddd��n#1swxYwY|�ut�
d*��	tC|d��5}|�"��}ddd��n#1swxYwYn#t`$rt)d+���wxYwtc|d,�-��}te|��\} }!| �d.} tg| |||!|�/��\}}"t<j4�5d0|�1��}#tm|#tn��s"to|�8|#����}#|#rtrt|#�2��z}$nd3}$t6j:�;d4��}%|%r6t6j:d5}&|&rtxt|%|&�6��z}'n
tz}'nd3}'t|j>�?��}(|�.t�t�t|||||t�|(jC|(jD|(jE|(jF|(jG|(jH|'|$�7��z����|�+��}�ns|dkr$d8}t�jJ||||
|||	|
|||||�
�
}�nI|d
k�rBt�t!j|t$d�����})t�t|)����}*|�t�t�tt�������}|�t�|*��}|�t�t�d9�t<jO������}|�t|)��}d:t�|�;d;t<jP��d,�-��z}+|�d<|+��}|||fS)=z�
    Given the source of the module, convert it to a Jinja2 template to insert
    module code and return whether it's a new or old style module.
    �old�binary�newrts(from ansible.module_utils.basic import *�
powershells,#Requires -Module Ansible.ModuleUtils.Legacys#Requires -Modules#Requires -Versions#AnsibleRequires -OSVersions#AnsibleRequires -Powershells#AnsibleRequires -CSharpUtil�jsonargss	WANT_JSON�non_native_want_jsonN)rSrXrTz)ANSIBALLZ: Could not determine module FQNzansible.modules.%s)�ANSIBLE_MODULE_ARGST)�cls�
vault_to_textzDUnable to pass options to module, they must be JSON serializable: %szOBad module compression string specified: %s.  Using ZIP_STORED (no compression)�ansiballz_cache�-z"ANSIBALLZ: using cached module: %srizANSIBALLZ: Using lock for %sz$ANSIBALLZ: Using generic lock for %szANSIBALLZ: Acquiring lockzANSIBALLZ: Lock acquired: %szANSIBALLZ: Creating module�w)�mode�compressionz&ANSIBALLZ: Writing module into payloadzANSIBALLZ: Writing modulez-part�wbzANSIBALLZ: Renaming modulezANSIBALLZ: Done creating modulez$ANSIBALLZ: Reading module after lockzvA different worker process failed to create module file. Look at traceback for that process for debugging information.rrz/usr/bin/python�r��PYTHON_MODULE_RLIMIT_NOFILErv)�
rlimit_nofiler��_ANSIBLE_COVERAGE_CONFIG�_ANSIBLE_COVERAGE_OUTPUT)�coverage_config�coverage_output)�zipdata�ansible_moduler8�paramsr��coding�year�month�day�hour�minute�second�coverage�rlimitz#!powershell�,ssyslog.�ansible_syslog_facilityssyslog.LOG_USER)Qr?�REPLACER�replace�NEW_STYLE_PYTHON_MODULE_RErC�REPLACER_WINDOWS�re�
IGNORECASE�REPLACER_JSONARGSr	rIr�r��debug�dict�repr�json�dumpsr�	TypeErrorr
r�getattr�zipfile�AttributeErrorr�
ZIP_STOREDrjrkr'r��DEFAULT_LOCAL_TMPrlrnror�id�ZipFiler,rQ�close�base64�	b64encode�getvalue�makedirs�OSError�write�rename�IOErrorr�_extract_interpreterr�r�r�rG�intr��ANSIBALLZ_RLIMIT_TEMPLATE�environr��ANSIBALLZ_COVERAGE_TEMPLATE�!ANSIBALLZ_COVERAGE_CHECK_TEMPLATE�datetime�utcnowr�ACTIVE_ANSIBALLZ_TEMPLATE�ENCODING_STRINGrmrnrorprqrr�ps_manifest�_create_powershell_wrapper�REPLACER_VERSIONr
�REPLACER_COMPLEX�REPLACER_SELINUX�DEFAULT_SELINUX_SPECIAL_FS�DEFAULT_SYSLOG_FACILITY),�module_namer<rF�module_argsr�r��module_compression�
async_timeout�become�
become_method�become_user�become_password�become_flags�environmentr��module_substyle�module_styler��outputrGrk�python_repred_paramsr#�compression_method�lookup_path�cached_module_filenamerir �lock�	zipoutputr!�f�
o_interpreter�o_argsr�rdrtrgrhrs�now�module_args_json�python_repred_args�facilitys,                                            r,�_find_module_utilsr�s�
��&+�*�O�l��-� � �@�)1�1��,�,�	�]�	"�	"���"��%�-�-�h�8c�d�d�
�
�	#�	*�	*�=�	9�	9�@���"���	�]�	*�	*���&��%�-�-�.>�@o�p�p�
�
�	��'���
�	F�	F�@��y�.�
�r�}�M�M�@��y�7���
�V�V�@��y�8�-���W�W�@��y�8�-���W�W�	@�
��&���	�m�	+�	+���$���	��	&�	&�)?�?��,��G��@�@�@��l�G�3�3�
�Y�Y�F�	?�3�K�@�@�����?�?�?�	�
�
�A�B�B�B�0�;�>����?�����(�"�"��+�7�7�7��	v�#'��
�6�?Q�ae�(f�(f�(f�#g�#g� � ���	v�	v�	v��e�hq�rs�ht�ht�t�u�u�u�����	v����	4�!(��2D�!E�!E�����	4�	4�	4��O�O�n�rD�D�
E�
E�
E�!(�!3����	4�����g�l�l�1�#6�8I�J�J��!#����k�FW�FW�FW�Yk�Yk�;l�!m�!m����
�7�>�>�0�1�1�I	h��M�M�>�AW�W�X�X�X��,�d�3�3�
-�{�%�*�*�,�,��
-�
-�
-�
-�
-�
-�
-�
-�
-�
-�
-����
-�
-�
-�
-���0�C�C�C��
�
�<�{�J�K�K�K�)�<�[�I����
�
�D�{�R�S�S�S�)�<�T�B���M�M�5�6�6�6��,
E�,
E��
�
�<�r�$�x�x�G�H�H�H��w�~�~�&<�=�=�(E��M�M�">�?�?�?� '�	�	�I� ����J\�]�]�]�B�%�[�2C�]�TV�W�W�W��M�M�"J�K�K�K�&�r�+<�m�L�L�L��H�H�J�J�J�$�.�y�/A�/A�/C�/C�D�D�G��7�>�>�+�6�6�	&�&��K��4�4�4�4��&�&�&�&�$&�7�>�>�+�#>�#>�&� %�&�&�&����
�M�M�"=�>�>�>��4�w�>��E�E�)������(�(�(�)�)�)�)�)�)�)�)�)�)�)����)�)�)�)��M�M�">�?�?�?��I�4�w�>�@V�W�W�W��M�M�"C�D�D�D�Y,
E�,
E�,
E�,
E�,
E�,
E�,
E�,
E�,
E�,
E�,
E����,
E�,
E�,
E�,
E�\���
�
�D�E�E�E�h��4�d�;�;�+�q�"#�&�&�(�(��+�+�+�+�+�+�+�+�+�+�+����+�+�+�+����h�h�h�&�(g�h�h�h�h�����'�*?�@�@�@�� 4�]� C� C��
�v�� �.�M�+�M�9�g�v�gv�w�w�w������1�1�2O�[d�1�e�e�
��-��-�-�	A��� 0� 0�� ?� ?�@�@�M��	�.��+�2�2�2��F�F��F��*�.�.�)C�D�D���	� �j�)C�D�O��

=�7��$3�$3�:�:�:����=����H���&�&�(�(�����X�7�$��&�(�'��"����)������:��:���;
�;
�;
�
���	�	�	� ���)�)�
�
�	�L�	(�	(�
"��$�>��;��[��6�=�+���/�9�6G�
�
�
�
�
�J�	&�	&�#�D�J�{�@R�bf�$g�$g�$g�h�h��&�d�+;�&<�&<�=�=��%�-�-�.>���k�IZ�IZ�@[�@[�\�\�
�%�-�-�.>�@R�S�S�
�%�-�-�.>�����RS�Rn�Io�Io�@p�@p�q�q�
�&�-�-�.?�AQ�R�R�
������7P�RS�Rk�)l�)l�vK�!L�!L�!L�L��%�-�-�.@�(�K�K�
��<��1�1s��!E1�1)F�F�8)G"�"
H�,H�H�H*�*3I �I �L!�!L%�(L%�7D W�S-�,W�-*T�W�T�0W�
U,� W�,U0	�0W�3U0	�4AW�W�W�7X4�X(�X4�(X,�,X4�/X,�0X4�4Yc�:�d}g}|�dd��}|d�d��rc|d���}tjt	|dd�d�����}d	�|D��}|d}|dd�}||fS)
z�
    Used to extract shebang expression from binary module data and return a text
    string with the shebang, or None if no shebang is detected.
    N�
rZrs#!r�rrc�0�g|]}t|d�����S)rr)r)r��as  r,r�z(_extract_interpreter.<locals>.<listcomp>#s&��Q�Q�Q�!�W�Q�'<�=�=�=�Q�Q�Qr.)rUr%r$�shlexr)r<r�r@�b_lines�	b_shebang�	cli_splits      r,r�r�s����K�
�D��!�!�%��+�+�G��q�z���U�#�#�	��A�J�$�$�&�&�	��K��	�!�"�"�
�>S� T� T� T�U�U�	�R�Q�y�Q�Q�Q�	���l������}�����r.r�c��|�in|}|�in|}t|d��5}|���}ddd��n#1swxYwYt|||||||||||	|
|||
���\}}}|dkr||t|d���fS|��t	|��\}}|��t|||||
���\}}|�dd	��}||krt|d
d���|d<tj	�
|���d
��r|�d	t��d�|��}|||fS)a
    Used to insert chunks of code into modules before transfer rather than
    doing regular python imports.  This allows for more efficient transfer in
    a non-bootstrapping scenario by not moving extra files over the wire and
    also takes care of embedding arguments in the transferred modules.

    This version is done in such a way that local imports can still be
    used in the module code, so IDEs don't have to be aware of what is going on.

    Example:

    from ansible.module_utils.basic import *

       ... will result in the insertion of basic.py into the module
       from the module_utils/ directory in the source tree.

    For powershell, this code effectively no-ops, as the exec wrapper requires access to a number of
    properties not available here.

    Nri)r�r�r�r�r�r�r�r�rT�passthru)�	nonstringrbr�rZr)rr�rrt)rnror�rr�r�rUrrjrkr�r%�insert�b_ENCODING_STRINGr')r�rFr�r�r�r�r�r�r�r�r�r�r�r�r�r<r�r�r�r@�new_interpreterr�s                      r,�
modify_moduler�*s���, �'���Y�I�#�+�"�"��K�	
�k�4�	 �	 �!�A������
�!�!�!�!�!�!�!�!�!�!�!����!�!�!�!�
.@��]�\g�it�v�BI�K]�N[�dj�{H�LW�ix�HT�LW�ix�.z�.z�.z�*�]�L�'�
�x����|�W�W�
�-S�-S�-S�T�T�	��0��?�?���T��"�'3�K��G�UY�kz�'{�'{�'{�$�G�_�$�)�)�%��3�3�G��o�-�-�%�g�6K�Wa�b�b�b���
��w����,�,�7�7�	�B�B�
5����q�"3�4�4�4�!�J�J�w�/�/�M��<��1�1s�>�A�Ac��|r	|d}n|}|�!d}t�||zd���|� d}t�|���g}n|�|g��}i}	i}
t	|t
��r|D]}|
�|���|�|
��}
|
D]u}|�d��r^|�	d��d}||vr?|	�|
�d|z��pi�
�����v|	�|
�|i���
����|	�|��|	S)	Nr�z�Finding module_defaults for the action %s. The caller passed a list of redirected action names, which is deprecated. The task's resolved action should be provided as the first argument instead.z2.16)�versionz�Finding module_defaults for action %s. The caller has not passed the action_groups, so any that may include this action will be ignored.)r�zgroup/zgroup/%s)r�r�rr�rGrH�updater�r%rU�copy)
�actionr@�defaultsr��redirected_names�
action_groups�resolved_action_namer��group_names�tmp_args�module_defaults�default�
group_names
             r,�get_action_args_with_defaultsr�ds����&�/��3���%���#�
[�	�
	���3�!5�5�v��F�F�F���
<�	�
	���C�� � � ����#�'�'�(<�b�A�A���H��O��(�D�!�!�,��	,�	,�G��"�"�7�+�+�+�+��&�&��7�7�O�"�]�]�����h�'�'�	]� ���x�0�0��4�J��[�(�(�����!4�!4�Z�*�5L�!M�!M�!S�QS� Y� Y� [� [�\�\�\��
�O�O�O�'�'�(<�b�A�A�F�F�H�H�I�I�I�
�O�O�D�����Or.rb)
Nr�rFNNNNNF)NN)a�
__future__rrr�type�
__metaclass__rEr�r�r�rjr�r�r{r�rrr�ior	�ansible.releaser
rr�rr��ansible.errorsr
�&ansible.executor.interpreter_discoveryr�ansible.executor.powershellrr�� ansible.module_utils.common.jsonr�+ansible.module_utils.common.text.convertersrrr�ansible.plugins.loaderr�2ansible.utils.collection_loader._collection_finderrr�ansible.executorr�ansible.utils.displayr�collectionsr�importlib.utilr��importlib.machineryr�rrwr�r�rzr}r�r�r�rkr'�dirname�__file__r�ANSIBALLZ_TEMPLATEr�r�r�r-�DEFAULT_KEEP_REMOTE_FILESr��
site_packagesr�escaperBrDry�NodeVisitorr0rrrTr�r�r�r�r,r?rIrQr�r�r�r�r�r.r,�<module>r�s���(C�B�B�B�B�B�B�B�B�B��
�
�
�
�
�
�
�
�
���������	�	�	�	���������	�	�	�	�����'�'�'�'�'�'�'�'�'�'�������3�3�3�3�3�3�3�3�"�"�"�"�"�"�'�'�'�'�'�'�T�T�T�T�T�T�F�F�F�F�F�F�?�?�?�?�?�?�T�T�T�T�T�T�T�T�T�T�6�6�6�6�6�6�i�i�i�i�i�i�i�i�
0�/�/�/�/�/�)�)�)�)�)�)�"�"�"�"�"�"���������
�'�)�)��$�*�%>�AF�AF�AF�G�G��0��-��A��)��;��5��-��.���W�\�\�"�'�/�/�(�";�";�T�>�R�R��C��J��,%�!���"�����D�!3���!0��0B� C� C��
�������������0I�0I� J� J�K�K�
�!�r�z�"O�R[�RT�R[�\i�Rj�Rj�"j�k�k���R�Z� k�l�l��(�R�Z�)�	�	��H!�H!�H!�H!�H!�c�o�H!�H!�H!�V���8=�u�w�w�PU�6$�6$�6$�6$�r@/�@/�@/�@/�@/�@/�@/�@/�J'�'�'�'�'�3�'�'�'�T5�5�5�5�5�"7�5�5�5�plB�lB�lB�^2�2�2����B'�'�'�:pu�u2�u2�u2�u2�p���.LQ�DI�72�72�72�72�t0�0�0�0�0�0r.

Youez - 2016 - github.com/yon3zu
LinuXploit