%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3.9/site-packages/ansible/plugins/lookup/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3.9/site-packages/ansible/plugins/lookup/__pycache__/__init__.cpython-39.pyc

a

�)gf�@shddlmZmZmZeZddlmZddlm	Z	ddl
mZddlm
Z
e
�ZdgZGdd�de�ZdS)	�)�absolute_import�division�print_function)�abstractmethod)�AnsibleFileNotFound)�
AnsiblePlugin)�Display�
LookupBasecsjeZdZd�fdd�	Zdd�Zedd��Zedd	��Zed
d��Ze	ddd
��Z
ddd�Zdd�Z�Z
S)r	Ncs$tt|���||_||_t|_dS�N)�superr	�__init__�_loaderZ_templar�display�_display)�self�loaderZtemplar�kwargs��	__class__��C/usr/lib/python3.9/site-packages/ansible/plugins/lookup/__init__.pyr#szLookupBase.__init__cCsd|vr|dS|j��SdS)NZ	role_path)r
�get_basedir)r�	variablesrrrr-szLookupBase.get_basedircCs6g}|D](}t|ttf�r&|�|�q|�|�q|Sr
)�
isinstance�list�tuple�extend�append)�terms�retZtermrrr�_flatten3szLookupBase._flattencCs0g}|D]"}|D]}|�t�||g��qq|Sr
)rr	r )�a�b�results�x�yrrr�_combine=s
zLookupBase._combinecCs&g}|D]}|�|||d��q|S)N)�key�value)r)rrr'rrr�_flatten_hash_to_listEsz LookupBase._flatten_hash_to_listcKsdS)a�
        When the playbook specifies a lookup, this method is run.  The
        arguments to the lookup become the arguments to this method.  One
        additional keyword argument named ``variables`` is added to the method
        call.  It contains the variables available to ansible at the time the
        lookup is templated.  For instance::

            "{{ lookup('url', 'https://toshio.fedorapeople.org/one.txt', validate_certs=True) }}"

        would end up calling the lookup plugin named url's run method like this::
            run(['https://toshio.fedorapeople.org/one.txt'], variables=available_variables, validate_certs=True)

        Lookup plugins can be used within playbooks for looping.  When this
        happens, the first argument is a list containing the terms.  Lookup
        plugins can also be called from within playbooks to return their
        values into a variable or parameter.  If the user passes a string in
        this case, it is converted into a list.

        Errors encountered during execution should be returned by raising
        AnsibleError() with a message describing the error.

        Any strings returned by this method that could ever contain non-ascii
        must be converted into python's unicode type as the strings will be run
        through jinja2 which has this requirement.  You can use::

            from ansible.module_utils._text import to_text
            result_string = to_text(result_string)
        Nr)rrrrrrr�runLszLookupBase.runFcCsbd|vr|d}n|�|�g}d}z|j�|||�}Wn&ty\|sX|j�d|�Yn0|S)zL
        Return a file (needle) in the task's expected search path.
        Zansible_search_pathNz?Unable to find '%s' in expected paths (use -vvvvv to see paths))rr
Zpath_dwim_relative_stackrrZwarning)rZmyvarsZsubdirZneedleZignore_missing�paths�resultrrr�find_file_in_search_pathls
z#LookupBase.find_file_in_search_pathcCsdSr
r)rrrr�_deprecate_inline_kvszLookupBase._deprecate_inline_kv)NN)N)F)�__name__�
__module__�__qualname__rr�staticmethodr r&r)rr*r-r.�
__classcell__rrrrr	!s

	


N)Z
__future__rrr�typeZ
__metaclass__�abcrZansible.errorsrZansible.pluginsrZansible.utils.displayrr�__all__r	rrrr�<module>s

Zerion Mini Shell 1.0