Dashboard
PHP:
8.2.30
OS:
Linux
User:
dh_nv8b2m
/
/
usr
/
local
/
lib
/
python3.10
/
dist-packages
/
ansible
/
plugins
/
inventory
/
__pycache__
📤 Upload
📝 New File
📁 New Folder
Close
Editing: auto.cpython-310.pyc
o O�h� � @ sL d dl mZ dZdZd dlmZ d dlmZ d dlm Z G dd� de�Z d S ) � )�annotationsa[ name: auto author: - Matt Davis (@nitzmahone) version_added: "2.5" short_description: Loads and executes an inventory plugin specified in a YAML config description: - By enabling the C(auto) inventory plugin, any YAML inventory config file with a C(plugin) key at its root will automatically cause the named plugin to be loaded and executed with that config. This effectively provides automatic enabling of all installed/accessible inventory plugins. - To disable this behavior, remove C(auto) from the C(INVENTORY_ENABLED) config element. z� # This plugin is not intended for direct use; it is a fallback mechanism for automatic enabling of # all installed inventory plugins. )�AnsibleParserError)�BaseInventoryPlugin)�inventory_loaderc s* e Zd ZdZ� fdd�Zddd�Z� ZS )�InventoryModule�autoc s( |� d�s|� d�sdS tt| ��|�S )Nz.ymlz.yamlF)�endswith�superr �verify_file)�self�path�� __class__� �I/usr/local/lib/python3.10/dist-packages/ansible/plugins/inventory/auto.pyr ! s zInventoryModule.verify_fileTc C s� |j |dd�}z|�dd �}W n ty d }Y nw |s$td�|���t�|�}|s3td�||���|�|�s@td�||���| j�d�|j |�� |j ||||d� z|�� W d S tye Y d S w )N�none)�cache�pluginzRno root 'plugin' key found, '{0}' is not a valid YAML inventory plugin config filez5inventory config '{0}' specifies unknown plugin '{1}'zFinventory source '{0}' could not be verified by inventory plugin '{1}'z>Using inventory plugin '{0}' to process inventory source '{1}')�load_from_file�get�AttributeErrorr �formatr r �display�v� _load_name�parse�update_cache_if_changed)r � inventory�loaderr r �config_data�plugin_namer r r r r &