Test plugins

Test plugins evaluate template expressions and return True or False. With test plugins you can create conditionals to implement the logic of your tasks, blocks, plays, playbooks, and roles. Ansible uses the standard tests `_ shipped as part of Jinja, and adds some specialized test plugins. You can :ref:`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.

Using test plugins

The User Guide offers detailed documentation on using test plugins.

See also

Intro to playbooks

An introduction to playbooks


Using tests


Using conditional statements

Filter plugins

Filter plugins

Using filters to manipulate data

Using filters

Lookup plugins

Lookup plugins

User Mailing List

Have a question? Stop by the google group!

Real-time chat

How to join Ansible chat channels