community / community.general / 6.6.8 / test / a_module Test whether a given string refers to an existing module or action plugin | "added in version" 4.0.0 of community.general" Authors: Felix Fontein (@felixfontein)community.general.a_module (6.6.8) — test
Install with ansible-galaxy collection install community.general:==6.6.8
collections: - name: community.general version: 6.6.8
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.
- 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"
_input: description: A string denoting a fully qualified collection name (FQCN) of a module or action plugin. required: true type: string
_value: description: Whether the module or action plugin denoted by the input exists. type: boolean