'Using tests as filters is deprecated' Warning When Running A Playbook In Ansible.

Solution In Progress - Updated -

Issue

  • When executing an old playbook with the latest Ansible, we received this warning:
[DEPRECATION WARNING]: Using tests as filters is deprecated. Instead of using `result|search` use `result is search`. This feature will be removed in version 2.9. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.

Environment

  • Ansible Engine 2.5 and above

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content