mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-23 02:41:25 -07:00
* Fix/improve docs.
* Document the a_module test.
* Document the dict filter.
* Linting.
* Add more filter docs.
* More filters.
* Update BOTMETA.
* Add another plugin.
* Fix typos.
* Add explicit entries.
* Fix lookup documentation.
(cherry picked from commit f055f47161
)
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
8e37b46912
commit
6f4167fb01
26 changed files with 1080 additions and 20 deletions
|
@ -4,6 +4,39 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
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
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
- 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"
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
_value:
|
||||
description: Whether the module or action plugin denoted by the input exists.
|
||||
type: boolean
|
||||
'''
|
||||
|
||||
from ansible.plugins.loader import action_loader, module_loader
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue