Skip to content

Commit

Permalink
Add a note about deprecated usage of tests as filters
Browse files Browse the repository at this point in the history
  • Loading branch information
bocharsky-bw committed Apr 16, 2018
1 parent 2d3ba50 commit f9a54bc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions knpu/idempotency-changed-when.md
Expand Up @@ -108,6 +108,11 @@ How? Instead of saying `changed_when: false`, use an expression:
If you use Twig, this will look familiar: we're reading a variable and piping it
through some `search` filter, which comes from Jinja.

***TIP
Using tests as filters is deprecated and will be removed in Ansible 2.9, use
`db_create_result.stdout is not search('already exists. Skipped')` instead.
***

For the migration task, we can do the same. Register the variable first: `db_migrations_result`.
Copy the `changed_when` and paste that below:

Expand Down

0 comments on commit f9a54bc

Please sign in to comment.