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__/dict.cpython-311.opt-1.pyc
�

���c���j�ddlmZmZmZeZdZdZdZddl	m
Z
ddlmZddl
mZGd�d	e��Zd
S)�)�absolute_import�division�print_functiona�
    name: dict
    version_added: "1.5"
    short_description: returns key/value pair items from dictionaries
    description:
        - Takes dictionaries as input and returns a list with each item in the list being a dictionary with 'key' and 'value' as
          keys to the previous dictionary's structure.
    options:
        _terms:
            description:
                - A list of dictionaries
            required: True
a
vars:
  users:
    alice:
      name: Alice Appleworth
      telephone: 123-456-7890
    bob:
      name: Bob Bananarama
      telephone: 987-654-3210
tasks:
  # with predefined vars
  - name: Print phone records
    ansible.builtin.debug:
      msg: "User {{ item.key }} is {{ item.value.name }} ({{ item.value.telephone }})"
    loop: "{{ lookup('ansible.builtin.dict', users) }}"
  # with inline dictionary
  - name: show dictionary
    ansible.builtin.debug:
      msg: "{{item.key}}: {{item.value}}"
    with_dict: {a: 1, b: 2, c: 3}
  # Items from loop can be used in when: statements
  - name: set_fact when alice in key
    ansible.builtin.set_fact:
      alice_exists: true
    loop: "{{ lookup('ansible.builtin.dict', users) }}"
    when: "'alice' in item.key"
zb
  _list:
    description:
      - list of composed dictonaries with key and value
    type: list
)�Mapping)�AnsibleError)�
LookupBasec��eZdZdd�ZdS)�LookupModuleNc���t|t��s|g}g}|D]N}t|t��std���|�|�|�����O|S)Nzwith_dict expects a dict)�
isinstance�listrr�extend�_flatten_hash_to_list)�self�terms�	variables�kwargs�results�terms      �@/usr/lib/python3.11/site-packages/ansible/plugins/lookup/dict.py�runzLookupModule.run@sz���%��&�&�	��G�E����	=�	=�D��d�G�,�,�
?�"�#=�>�>�>��N�N�4�5�5�d�;�;�<�<�<�<���)N)�__name__�
__module__�__qualname__r�rrr
r
>s(������
�
�
�
�
�
rr
N)�
__future__rrr�type�
__metaclass__�
DOCUMENTATION�EXAMPLES�RETURN�collections.abcr�ansible.errorsr�ansible.plugins.lookuprr
rrr�<module>r&s���C�B�B�B�B�B�B�B�B�B��
��
���8
��$�#�#�#�#�#�'�'�'�'�'�'�-�-�-�-�-�-������:�����r

Youez - 2016 - github.com/yon3zu
LinuXploit