Dashboard
PHP:
8.2.30
OS:
Linux
User:
dh_nv8b2m
/
/
usr
/
local
/
lib
/
python3.10
/
dist-packages
/
ansible
/
plugins
/
lookup
/
__pycache__
📤 Upload
📝 New File
📁 New Folder
Close
Editing: unvault.cpython-310.pyc
o O�h � @ sb d dl mZ dZdZdZd dlmZ d dlmZ d dl m Z d dlmZ e� Z G d d � d e�ZdS )� )�annotationsa+ name: unvault author: Ansible Core Team version_added: "2.10" short_description: read vaulted file(s) contents description: - This lookup returns the contents from vaulted (or not) file(s) on the Ansible controller's file system. options: _terms: description: path(s) of files to read required: True notes: - This lookup does not understand 'globbing' nor shell environment variables. seealso: - ref: playbook_task_paths description: Search paths used for relative files. z� - ansible.builtin.debug: msg="the value of foo.txt is {{ lookup('ansible.builtin.unvault', '/etc/foo.txt') | string | trim }}" z_ _raw: description: - content of file(s) as bytes type: list elements: raw )�AnsibleParserError)� LookupBase)�to_text)�Displayc @ s e Zd Zddd�ZdS )�LookupModuleNc K s� g }| j ||d� |D ]G}t�d| � | �|d|�}t�d| � |rM| jj|dd�}t|d��}|�� } W d � n1 s@w Y |� t | �� qtd| ��|S ) N)�var_options�directzUnvault lookup term: %s�fileszUnvault lookup found %sT)�decrypt�rbz"Unable to find file matching "%s" )�set_options�display�debug�find_file_in_search_path�vvvv�_loader� get_real_file�open�read�appendr r ) �self�terms� variables�kwargs�ret�term� lookupfile�actual_file�f� b_contents� r! �I/usr/local/lib/python3.10/dist-packages/ansible/plugins/lookup/unvault.py�run- s �zLookupModule.run)N)�__name__� __module__�__qualname__r# r! r! r! r"