Skip to content

Commit

Permalink
Document that no-changed-when also applies to handlers (#3237)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea authored Apr 3, 2023
1 parent 1460131 commit 56da717
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/ansiblelint/rules/no_changed_when.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ detect if a change has occurred or not. Some of the most common examples are
[shell] and [command] modules, which run arbitrary commands.

One very common workaround is to use a boolean value like `changed_when: false`
if the task never changes anything or `changed_when: true` if it always
changes something, but you can also use any expressions, including ones that
use the registered result of a task, like in our example below.
if the task never changes anything or `changed_when: true` if it always changes
something, but you can also use any expressions, including ones that use the
registered result of a task, like in our example below.

This rule also applies to handlers, not only to tasks because they are also
tasks.

## Problematic Code

Expand Down

0 comments on commit 56da717

Please sign in to comment.