관리-도구
편집 파일: dataloader.cpython-39.opt-1.pyc
a �)g�M � @ s d dl mZmZmZ eZd dlZd dlZd dlZd dl Z d dl Z d dlmZ d dlmZmZ d dlmZ d dlmZmZ d dlmZmZmZ d dlmZ d d lmZ d d lmZm Z m!Z!m"Z"m#Z# d dl$m%Z% d dl&m'Z' e'� Z(e �)d ej*j+ej*j+f �Z,G dd� d�Z-dS )� )�absolute_import�division�print_functionN)� constants)�AnsibleFileNotFound�AnsibleParserError)� is_executable)�binary_type� text_type)�to_bytes� to_native�to_text)�unquote)� from_yaml)�VaultLib�b_HEADER�is_encrypted�is_encrypted_file�parse_vaulttext_envelope)�unfrackpath)�Displayz(?:^|%s)+tasks%s?$c @ s� e Zd ZdZdd� Zdd� Zd4d d �Zd5dd�Zd d� Zdd� Z dd� Z dd� Zdd� Zd6dd�Z dd� Zdd� Zdd� Zd d!� Zd"d#� Zd7d$d%�Zd8d&d'�Zd(d)� Zd9d*d+�Zd,d-� Zd.d/� Zd:d0d1�Zd2d3� ZdS );� DataLoadera The DataLoader class is used to load and parse YAML or JSON content, either from a given file name or from a string that was previously read in through other means. A Vault password can be specified, and any vault-encrypted files will be decrypted. Data read from files will also be cached, so the file will never be read from disk more than once. Usage: dl = DataLoader() # optionally: dl.set_vault_password('foo') ds = dl.load('...') ds = dl.load_from_file('/path/to/file') c C s2 d| _ t� | _t� | _i | _t� | _| �d � d S )N�.) �_basedir�dict�_FILE_CACHE�set� _tempfilesZ_vaultsr �_vault�set_vault_secrets��self� r"