Dashboard
PHP:
8.2.30
OS:
Linux
User:
dh_nv8b2m
/
/
usr
/
local
/
lib
/
python3.10
/
dist-packages
/
ansible
/
config
/
__pycache__
📤 Upload
📝 New File
📁 New Folder
Close
Editing: manager.cpython-310.pyc
o O�h�d � @ sD d dl mZ d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl m Z d dlmZm Z d dlmZ d dlmZmZ d dlmZmZmZ d dlmZ d d lmZ d d lmZ d dlmZ d dlm Z d d l!m"Z"m#Z#m$Z$ e dd�Z%ddiZ&dd� Z'd"dd�Z(d#dd�Z)dd� Z*dd� Z+d#dd�Z,dd� Z-G d d!� d!e.�Z/dS )$� )�annotationsN)� namedtuple)�Mapping�Sequence)�NativeEnvironment)�AnsibleOptionsError�AnsibleError)�to_text�to_bytes� to_native)� yaml_load)�string_types)�boolean)�unquote)�AnsibleVaultEncryptedUnicode)�cleanup_tmp_file� makedirs_safe�unfrackpath�Settingzname value origin type�lookup)�_termsc C s4 d}| r|d| 7 }|r|d| 7 }|d| 7 }|S )z& construct entry for requested config � zplugin_type: %s zplugin: %s zsetting: %s � )�plugin_type�plugin_name�config�entryr r �A/usr/local/lib/python3.10/dist-packages/ansible/config/manager.py� _get_entry! s r c s� d}d� |rt j�|�rt j�t|��r|� |r|�� }| du�rV|dv r-t| dd�} �n|dv r7t| �} �n|dkrAt| �} �n|dkr]t | t �rUd d � | �d�D �} n�t | t�s\d}n�|dkrn| d krgd} | durmd }n�|dkr�t | t �r~t | � d�} n�d}n�|dv r�t | t �r�t | � d�} t j�| �s�t| d� dt �� }tj|| d�} tjt| dd� n�d}n�|dkr�t | t �r�| �t j�} t | t�r҇ fdd �| D �} nwd}nt|dkr�t | t �r�dd � | �d�D �} t | t�r�� fdd �| D �} nRd}nO|dv �rt | t��sd}nA|dv �r/t | t tttttf��r,t| dd �} |�r+|d!k�r+t| �} nd"}nt | t tf��rIt| dd �} |�rI|d!k�rIt| �} |�rVtd#|t| �f ��t| dd$d%�S )&a return a configuration variable with casting :arg value: The value to ensure correct typing of :kwarg value_type: The type of the value. This can be any of the following strings: :boolean: sets the value to a True or False value :bool: Same as 'boolean' :integer: Sets the value to an integer or raises a ValueType error :int: Same as 'integer' :float: Sets the value to a float or raises a ValueType error :list: Treats the value as a comma separated list. Split the value and return it as a python list. :none: Sets the value to None :path: Expands any environment variables and tilde's in the value. :tmppath: Create a unique temporary directory inside of the directory specified by value and return its path. :temppath: Same as 'tmppath' :tmp: Same as 'tmppath' :pathlist: Treat the value as a typical PATH string. (On POSIX, this means comma separated strings.) Split the value and then expand each part for environment variables and tildes. :pathspec: Treat the value as a PATH string. Expands any environment variables tildes's in the value. :str: Sets the value to string types. :string: Same as 'str' r N)r �boolF)�strict)�integer�int�float�listc S s g | ]}t |�� ��qS r )r �strip��.0�xr r r � <listcomp>[ � zensure_type.<locals>.<listcomp>�,�none�None�path��basedir)�tmp�temppath�tmppathi� zansible-local-%s)�prefix�dirT)�warnr2 �pathspecc � g | ]}t |� d ��qS �r/ ��resolve_pathr&