
    Vh`                     |    d dl mZmZmZ eZdZdZdZd dl	m
Z
mZ 	 d dlmZ d Z G d d	e      Zy
# e$ r eZY w xY w)    )absolute_importdivisionprint_functiona  
name: a_module
short_description: Test whether a given string refers to an existing module or action plugin
version_added: 4.0.0
author: Felix Fontein (@felixfontein)
description:
  - Test whether a given string refers to an existing module or action plugin.
  - This can be useful in roles, which can use this to ensure that required modules are present ahead of time.
options:
  _input:
    description: A string denoting a fully qualified collection name (FQCN) of a module or action plugin.
    type: string
    required: true
at  
- name: Make sure that community.aws.route53 is available
  ansible.builtin.assert:
    that:
      - >
        'community.aws.route53' is community.general.a_module

- name: Make sure that community.general.does_not_exist is not a module or action plugin
  ansible.builtin.assert:
    that:
      - "'community.general.does_not_exist' is not community.general.a_module"
zi
_value:
  description: Whether the module or action plugin denoted by the input exists.
  type: boolean
)action_loadermodule_loader)AnsiblePluginRemovedErrorc                 p    	 t         t        fD ]  }|j                  |       }| y y# t        $ r Y yw xY w)z
    Example:
      - 'community.general.ufw' is community.general.a_module
      - 'community.general.does_not_exist' is not community.general.a_module
    TF)r   r   find_pluginr   )termloaderdatas      k/home/dcms/DCMS/lib/python3.12/site-packages/ansible_collections/community/general/plugins/test/a_module.pya_moduler   2   sK    $m4 	F%%d+D	 $ s   ") ) ) 	55c                       e Zd ZdZd Zy)
TestModulez Ansible jinja2 tests c                     dt         iS )Nr   )r   )selfs    r   testszTestModule.testsE   s    
 	
    N)__name__
__module____qualname____doc__r    r   r   r   r   B   s
     
r   r   N)
__future__r   r   r   type__metaclass__DOCUMENTATIONEXAMPLESRETURNansible.plugins.loaderr   r   ansible.errorsr   ImportError	Exceptionr   objectr   r   r   r   <module>r&      s^   
 C B
 @*8
 
 
)  * )*s   1 ;;