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

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

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

���c�
��z�ddlmZmZmZeZdZdZdZddl	m
Z
ddlmZm
Z
ddlmZddlmZGd	�d
e��ZdS)�)�absolute_import�division�print_functionaf
    name: nested
    version_added: "1.1"
    short_description: composes a list with nested elements of other lists
    description:
        - Takes the input lists and returns a list with elements that are lists composed of the elements of the input lists
    options:
      _raw:
         description:
           - a set of lists
         required: True
as
- name: give users access to multiple databases
  community.mysql.mysql_user:
    name: "{{ item[0] }}"
    priv: "{{ item[1] }}.*:ALL"
    append_privs: yes
    password: "foo"
  with_nested:
    - [ 'alice', 'bob' ]
    - [ 'clientdb', 'employeedb', 'providerdb' ]
# As with the case of 'with_items' above, you can use previously defined variables.:

- name: here, 'users' contains the above list of employees
  community.mysql.mysql_user:
    name: "{{ item[0] }}"
    priv: "{{ item[1] }}.*:ALL"
    append_privs: yes
    password: "foo"
  with_nested:
    - "{{ users }}"
    - [ 'clientdb', 'employeedb', 'providerdb' ]
zr
  _list:
    description:
      - A list composed of lists paring the elements of the input lists
    type: list
)�UndefinedError)�AnsibleError�AnsibleUndefinedVariable)�
LookupBase)�listify_lookup_plugin_termsc��eZdZd�Zdd�ZdS)�LookupModulec��g}|D]T}	t||jd���}n$#t$r}td|z���d}~wwxYw|�|���U|S)NT)�templar�fail_on_undefinedz<One of the nested variables was undefined. The error was: %s)r
�_templarrr�append)�self�terms�	variables�results�x�intermediate�es       �B/usr/lib/python3.11/site-packages/ansible/plugins/lookup/nested.py�_lookup_variableszLookupModule._lookup_variables;s������	)�	)�A�
s�:�1�d�m�gk�l�l�l����!�
s�
s�
s�.�/m�pq�/q�r�r�r�����
s�����N�N�<�(�(�(�(��s� �
A�<�ANc���|�||��}|dd�}|���g}t|��dkrtd���|���}t|��dkr=|�||�����}|}t|��dk�=g}|D]*}|�|�|�����+|S)Nrz<with_nested requires at least one element in the nested list)r�reverse�lenr�pop�_combiner�_flatten)	rrr�kwargs�my_list�result�result2�
new_resultrs	         r�runzLookupModule.runEs����&�&�u�i�8�8������(�����������w�<�<�1����]�^�^�^��������'�l�l�Q����m�m�F�G�K�K�M�M�:�:�G��F��'�l�l�Q����
��	0�	0�A����d�m�m�A�.�.�/�/�/�/���)N)�__name__�
__module__�__qualname__rr&�r'rrr9s7��������������r'rN)�
__future__rrr�type�
__metaclass__�
DOCUMENTATION�EXAMPLES�RETURN�jinja2.exceptionsr�ansible.errorsrr�ansible.plugins.lookupr	�ansible.utils.listifyr
rr+r'r�<module>r6s���C�B�B�B�B�B�B�B�B�B��
��
���.
��-�,�,�,�,�,�A�A�A�A�A�A�A�A�-�-�-�-�-�-�=�=�=�=�=�=������:�����r'

Youez - 2016 - github.com/yon3zu
LinuXploit