HEX
Server: LiteSpeed
System: Linux kapuas.iixcp.rumahweb.net 5.14.0-427.42.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 1 14:58:02 EDT 2024 x86_64
User: mirz4654 (1666)
PHP: 8.1.33
Disabled: system,exec,escapeshellarg,escapeshellcmd,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,popen,pclose,dl,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setsid,posix_setuid,posix_setpgid,ini_alter,show_source,define_syslog_variables,symlink,syslog,openlog,openlog,closelog,ocinumcols,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dll,ftp,myshellexec,socket_bind,mail,posix_getwpuid
Upload Files
File: //usr/lib/python3.9/site-packages/ansible/plugins/lookup/__pycache__/nested.cpython-39.pyc
a

�)g�
�@slddlmZmZmZeZdZdZdZddl	m
Z
ddlmZm
Z
ddlmZddlmZGd	d
�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@seZdZdd�Zddd�ZdS)�LookupModulecCsbg}|D]T}zt||jdd�}Wn0tyP}ztd|��WYd}~n
d}~00|�|�q|S)NT)ZtemplarZfail_on_undefinedz<One of the nested variables was undefined. The error was: %s)r	Z_templarrr�append)�self�terms�	variables�results�xZintermediate�e�r�A/usr/lib/python3.9/site-packages/ansible/plugins/lookup/nested.py�_lookup_variables;s"zLookupModule._lookup_variablesNc	Ks�|�||�}|dd�}|��g}t|�dkr8td��|��}t|�dkrb|�||���}|}q@g}|D]}|�|�|��qj|S)Nrz<with_nested requires at least one element in the nested list)r�reverse�lenr�popZ_combinerZ_flatten)	rr
r�kwargsZmy_list�resultZresult2Z
new_resultrrrr�runEszLookupModule.run)N)�__name__�
__module__�__qualname__rrrrrrr
9s
r
N)Z
__future__rrr�typeZ
__metaclass__Z
DOCUMENTATIONZEXAMPLESZRETURNZjinja2.exceptionsrZansible.errorsrrZansible.plugins.lookuprZansible.utils.listifyr	r
rrrr�<module>s