Skip to content

Commit

Permalink
Document fix for literal_compare == False (#3207)
Browse files Browse the repository at this point in the history
Co-authored-by: Sorin Sbarnea <[email protected]>
  • Loading branch information
jemand771 and ssbarnea committed Mar 24, 2023
1 parent dfba371 commit 33de6bc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ansiblelint/rules/literal_compare.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ This rule checks for literal comparison with the `when` clause.
Literal comparison, like `when: var == True`, is unnecessarily complex.
Use `when: var` to keep your playbooks simple.

Similarly, a check like `when: var != True` or `when: var == False`
should be replaced with `when: not var`.

## Problematic Code

```yaml
Expand Down

0 comments on commit 33de6bc

Please sign in to comment.