1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/tests/integration/targets/test_a_module/runme.yml
Felix Fontein c69810bf04
Add test plugin which allows to query whether a module or action plugin is available (#3628)
* Add test which allows to query whether an action is available.

* Add documentation.

* Fix FreeBSD / macOS compatibility.

* Rename an_action -> a_module.

* Forgot one place.
2021-11-01 19:00:24 +01:00

25 lines
1.4 KiB
YAML

- hosts: localhost
tasks:
- name: Test a_module
assert:
that:
# Modules/actions that do not exist
- "'foo_bar' is not community.general.a_module"
- "'foo.bar.baz' is not community.general.a_module"
# Short name and FQCN for builtin and other collections
- "'file' is community.general.a_module"
- "'set_fact' is community.general.a_module"
- "'ansible.builtin.file' is community.general.a_module"
- "'ansible.builtin.set_fact' is community.general.a_module"
- "'ansible.builtin.foo_bar' is not community.general.a_module"
- "'community.crypto.acme_certificate' is community.general.a_module"
- "'community.crypto.openssl_privatekey_pipe' is community.general.a_module"
- "'community.crypto.foo_bar' is not community.general.a_module"
# Modules from this collection (that exist or not)
- "'community.general.ufw' is community.general.a_module"
- "'community.general.foooo_really_does_not_exist' is not community.general.a_module"
# Local module
- "'local_module' is community.general.a_module"
# Local collection module (that exist or not)
- "'testns.testcoll.collection_module' is community.general.a_module"
- "'testns.testcoll.foobar' is not community.general.a_module"