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

���c�
��v�ddlmZmZmZeZdZdZdZddl	m
Z
ddlmZddl
mZddlmZGd	�d
e��ZdS)�)�absolute_import�division�print_functiona�
    name: env
    author: Jan-Piet Mens (@jpmens) <jpmens(at)gmail.com>
    version_added: "0.9"
    short_description: Read the value of environment variables
    description:
      - Allows you to query the environment variables available on the
        controller when you invoked Ansible.
    options:
      _terms:
        description:
          - Environment variable or list of them to lookup the values for.
        required: True
      default:
        description: What return when the variable is undefined
        type: raw
        default: ''
        version_added: '2.13'
    notes:
        - You can pass the C(Undefined) object as C(default) to force an undefined error
a�
- name: Basic usage
  ansible.builtin.debug:
    msg: "'{{ lookup('ansible.builtin.env', 'HOME') }}' is the HOME environment variable."

- name: Before 2.13, how to set default value if the variable is not defined.
        This cannot distinguish between USR undefined and USR=''.
  ansible.builtin.debug:
    msg: "{{ lookup('ansible.builtin.env', 'USR')|default('nobody', True) }} is the user."

- name: Example how to set default value if the variable is not defined, ignores USR=''
  ansible.builtin.debug:
    msg: "{{ lookup('ansible.builtin.env', 'USR', default='nobody') }} is the user."

- name: Set default value to Undefined, if the variable is not defined
  ansible.builtin.debug:
    msg: "{{ lookup('ansible.builtin.env', 'USR', default=Undefined) }} is the user."

- name: Set default value to undef(), if the variable is not defined
  ansible.builtin.debug:
    msg: "{{ lookup('ansible.builtin.env', 'USR', default=undef()) }} is the user."
zY
  _list:
    description:
      - Values from the environment variables.
    type: list
)�	Undefined)�AnsibleUndefinedVariable)�
LookupBase)�	py3compatc��eZdZd�ZdS)�LookupModulec�X�|�||���g}|�d��}|D]x}|���d}tj�||��}t
|t��rtd|z���|�	|���y|S)N)�var_options�direct�defaultrz1The "env" lookup, found an undefined variable: %s)
�set_options�
get_option�splitr	�environ�get�
isinstancerr�append)	�self�terms�	variables�kwargs�ret�d�term�var�vals	         �?/usr/lib/python3.11/site-packages/ansible/plugins/lookup/env.py�runzLookupModule.runCs������Y�v��>�>�>����O�O�I�&�&���	�	�D��*�*�,�,�q�/�C��#�'�'��Q�/�/�C��#�y�)�)�
j�.�/b�eh�/h�i�i�i��J�J�s�O�O�O�O��
�N)�__name__�
__module__�__qualname__r!�r"r rrBs#����������r"rN)�
__future__rrr�type�
__metaclass__�
DOCUMENTATION�EXAMPLES�RETURN�jinja2.runtimer�ansible.errorsr�ansible.plugins.lookupr�
ansible.utilsr	rr&r"r �<module>r1s���C�B�B�B�B�B�B�B�B�B��
��
�,��.
��%�$�$�$�$�$�3�3�3�3�3�3�-�-�-�-�-�-�#�#�#�#�#�#�
�
�
�
�
�:�
�
�
�
�
r"

Youez - 2016 - github.com/yon3zu
LinuXploit