Document all filter and test plugins (#4597) (#4603)

* 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:
patchback[bot] 2022-05-02 07:49:06 +02:00 committed by GitHub
parent 8e37b46912
commit 6f4167fb01
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 1080 additions and 20 deletions

View file

@ -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