ansible/docs/docsite/rst/plugins/test.rst
Alicia Cozine a7be495b7b
Update plugin docs (#75050)
* edit existing plugin pages, headings, and links
2021-06-21 16:07:18 -04:00

1.5 KiB

Test plugins

Test plugins evaluate template expressions and return True or False. With test plugins you can create conditionals <playbooks_conditionals> to implement the logic of your tasks, blocks, plays, playbooks, and roles. Ansible leverages the standard tests shipped as part of Jinja, and adds some specialized test plugins. You can create custom Ansible test plugins <developing_test_plugins>.

Enabling test plugins

You can add a custom test plugin by dropping it into a test_plugins directory adjacent to your play, inside a role, or by putting it in one of the test plugin directory sources configured in ansible.cfg <ansible_configuration_settings>.

Using test plugins

The User Guide offers detailed documentation on using test plugins <playbooks_tests>.

about_playbooks

An introduction to playbooks

playbooks_tests

Using tests

playbooks_conditionals

Using conditional statements

filter_plugins

Filter plugins

playbooks_filters

Using filters

lookup_plugins

Lookup plugins

User Mailing List

Have a question? Stop by the google group!

irc.libera.chat

#ansible IRC chat channel