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__/fileglob.cpython-311.pyc
�

���c���~�ddlmZmZmZeZdZdZdZddl	Z	ddl
Z
ddlmZddl
mZddlmZmZGd	�d
e��ZdS)�)�absolute_import�division�print_functionad
    name: fileglob
    author: Michael DeHaan
    version_added: "1.4"
    short_description: list files matching a pattern
    description:
        - Matches all files in a single directory, non-recursively, that match a pattern.
          It calls Python's "glob" library.
    options:
      _terms:
        description: path(s) of files to read
        required: True
    notes:
      - Patterns are only supported on files, not directory/paths.
      - See R(Ansible task paths,playbook_task_paths) to understand how file lookup occurs with paths.
      - Matching is against local system files on the Ansible controller.
        To iterate a list of files on a remote node, use the M(ansible.builtin.find) module.
      - Returns a string list of paths joined by commas, or an empty list if no files match. For a 'true list' pass C(wantlist=True) to the lookup.
a_
- name: Display paths of all .txt files in dir
  ansible.builtin.debug: msg={{ lookup('ansible.builtin.fileglob', '/my/path/*.txt') }}

- name: Copy each file over that matches the given pattern
  ansible.builtin.copy:
    src: "{{ item }}"
    dest: "/etc/fooapp/"
    owner: "root"
    mode: 0600
  with_fileglob:
    - "/playbooks/files/fooapp/*"
zS
  _list:
    description:
      - list of files
    type: list
    elements: path
N)�
LookupBase)�AnsibleFileNotFound)�to_bytes�to_textc��eZdZdd�ZdS)�LookupModuleNc
��g}|D�]O}tj�|��}g}||krH|�|�|dtj�|������npd|vr	|d}n|�|��g}|D]J}	|�tj�|	d����|�|	���K|D]j}
|
rftjttj�|
|��d�����}d�|D��}|r|�
|��n�k��Q|S)N�files�ansible_search_path�surrogate_or_strict��errorsc�n�g|]2}tj�|���!t|d�����3S)rr)�os�path�isfiler	)�.0�gs  �D/usr/lib/python3.11/site-packages/ansible/plugins/lookup/fileglob.py�
<listcomp>z$LookupModule.run.<locals>.<listcomp>Ps?��#s�#s�#s�QR�ac�ah�ao�ao�pq�ar�ar�#s�G�A�6K�$L�$L�$L�#s�#s�#s�)rr�basename�append�find_file_in_search_path�dirname�get_basedir�join�globr�extend)
�self�terms�	variables�kwargs�ret�term�	term_file�found_paths�paths�p�dwimmed_path�globbed�term_resultss
             r�runzLookupModule.run;so�����	�	�D���(�(��.�.�I��K��D� � ��"�"�4�#@�#@��G�UW�U\�Ud�Ud�ei�Uj�Uj�#k�#k�l�l�l�l�)�I�5�5�%�&;�<�E�E�!�-�-�i�8�8�9�E��*�*�A��&�&�r�w�|�|�A�w�'?�'?�@�@�@��&�&�q�)�)�)�)� +�
�
����"�i������l�I�1V�1V�_t�(u�(u�(u�v�v�G�#s�#s�V]�#s�#s�#s�L�#���
�
�<�0�0�0������
r)N)�__name__�
__module__�__qualname__r0�rrrr9s(�����������rr)�
__future__rrr�type�
__metaclass__�
DOCUMENTATION�EXAMPLES�RETURNrr!�ansible.plugins.lookupr�ansible.errorsr�ansible.module_utils._textrr	rr4rr�<module>r>s���C�B�B�B�B�B�B�B�B�B��
��
�(��
��
�	�	�	�����-�-�-�-�-�-�.�.�.�.�.�.�8�8�8�8�8�8�8�8������:�����r

Youez - 2016 - github.com/yon3zu
LinuXploit