Filter plugins

Filter plugins manipulate data. With the right filter you can extract a particular value, transform data types and formats, perform mathematical calculations, split and concatenate strings, insert dates and times, and do much more. Ansible uses the standard filters shipped with Jinja2 and adds some specialized filter plugins. You can create custom Ansible filters as plugins.

Enabling filter plugins

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

Using filter plugins

For information on using filter plugins, see Using filters to manipulate data.

See also

Intro to playbooks

An introduction to playbooks

Inventory plugins

Inventory plugins

Callback plugins

Callback plugins

Test plugins

Test plugins

Lookup plugins

Lookup plugins

User Mailing List

Have a question? Stop by the google group!

Real-time chat

How to join Ansible chat channels