관리-도구
편집 파일: collectionsearch.cpython-39.opt-1.pyc
a �)g^ � @ s� d dl mZmZmZ eZd dlmZ d dlm Z d dl mZ d dlm Z d dlmZ d dlmZ e� Zd d d �ZG dd� d�ZdS )� )�absolute_import�division�print_function)�string_types)�FieldAttribute)�AnsibleCollectionConfig)�is_template)�Display)�NativeEnvironmentNc C sL t j}| d u rg } |r*|| vr*| �d|� | rHd| vrHd| vrH| �d� | S )Nr zansible.builtinzansible.legacy)r �default_collection�insert�append)�collection_listr � r �E/usr/lib/python3.9/site-packages/ansible/playbook/collectionsearch.py�_ensure_default_collection s r c @ s( e Zd Zedededdd�Zdd� ZdS )�CollectionSearch�list�d T)ZisaZlistof�priority�defaultZalways_post_validateZstaticc C sV | � d| j�d�|d �}t|d� |s*d S t� }|D ]}t||�r4t�d| � q4|S )N�collections)r zf"collections" is not templatable, but we found: %s, it will not be templated and will be used "as is".)Zget_validated_valueZfattributes�getr r r �displayZwarning)�self�attrZds�envZcollection_namer r r �_load_collections* s �z"CollectionSearch._load_collectionsN)�__name__� __module__�__qualname__r r r r r r r r r r $ s �r )N)Z __future__r r r �typeZ __metaclass__Zansible.module_utils.sixr Zansible.playbook.attributer Zansible.utils.collection_loaderr Zansible.templater Zansible.utils.displayr Zjinja2.nativetypesr r r r r r r r �<module> s