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 : |
� ���c� � � � d dl mZmZmZ eZdZdZdZd dl m Z d dlmZ d dl mZ d dlmZ e� � Z G d � d e� � ZdS )� )�absolute_import�division�print_functiona� 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. 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 � � e Zd Zdd�ZdS )�LookupModuleNc � � g }| � ||�� � |D ]�}t � d|z � � | � |d|� � }t � d|z � � |r{| j � |d�� � }t |d� � 5 }|� � � } d d d � � n# 1 swxY w Y |� t | � � � � ��t d|z � � �|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_contentss �C/usr/lib/python3.11/site-packages/ansible/plugins/lookup/unvault.py�runzLookupModule.run+ sC � ������Y�v��>�>�>�� V� V�D��M�M�3�d�:�;�;�;� �6�6�y�'�4�P�P�J��L�L�3�j�@�A�A�A�� V�"�l�8�8��T�8�R�R���+�t�,�,� *��!"�����J�*� *� *� *� *� *� *� *� *� *� *���� *� *� *� *�� � �7�:�.�.�/�/�/�/�(�)M�PT�)T�U�U�U�� s �B>�>C �C )N)�__name__� __module__�__qualname__r'