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__/varnames.cpython-39.pyc
a

�)g>	�@spddlmZmZmZeZdZdZdZddl	Z	ddl
mZddlm
Z
ddlmZdd	lmZGd
d�de�ZdS)�)�absolute_import�division�print_functionaU
    name: varnames
    author: Ansible Core Team
    version_added: "2.8"
    short_description: Lookup matching variable names
    description:
      - Retrieves a list of matching Ansible variable names.
    options:
      _terms:
        description: List of Python regex patterns to search for in variable names.
        required: True
am
- name: List variables that start with qz_
  ansible.builtin.debug: msg="{{ lookup('ansible.builtin.varnames', '^qz_.+')}}"
  vars:
    qz_1: hello
    qz_2: world
    qa_1: "I won't show"
    qz_: "I won't show either"

- name: Show all variables
  ansible.builtin.debug: msg="{{ lookup('ansible.builtin.varnames', '.+')}}"

- name: Show variables with 'hosts' in their names
  ansible.builtin.debug: msg="{{ lookup('ansible.builtin.varnames', 'hosts')}}"

- name: Find several related variables that end specific way
  ansible.builtin.debug: msg="{{ lookup('ansible.builtin.varnames', '.+_zone$', '.+_location$') }}"

zQ
_value:
  description:
    - List of the variable names requested.
  type: list
N)�AnsibleError)�	to_native)�string_types)�
LookupBasec@seZdZddd�ZdS)�LookupModuleNc
Ks�|durtd��|j||d�g}t|���}|D]�}t|t�sTtd|t|�f��zt�|�}Wn8t	y�}z td|t
|�f��WYd}~n
d}~00|D]}	|�|	�r�|�|	�q�q2|S)Nz No variables available to search)Zvar_optionsZdirectz<Invalid setting identifier, "%s" is not a string, it is a %sz,Unable to use "%s" as a search parameter: %s)
rZset_options�list�keys�
isinstancer�type�re�compile�	Exceptionr�search�append)
�selfZtermsZ	variables�kwargs�retZvariable_namesZterm�name�eZvarname�r�C/usr/lib/python3.9/site-packages/ansible/plugins/lookup/varnames.py�run8s 
*
zLookupModule.run)N)�__name__�
__module__�__qualname__rrrrrr	6sr	)Z
__future__rrrr
Z
__metaclass__Z
DOCUMENTATIONZEXAMPLESZRETURNrZansible.errorsrZansible.module_utils._textrZansible.module_utils.sixrZansible.plugins.lookuprr	rrrr�<module>s