Ansible-lint

From DWIKI
Revision as of 09:29, 16 February 2022 by Tony (talk | contribs) (Created page with "=FAQ= ==Don't compare to literal True/False== Instead of when: (foo == 1 and bar == 0) == false use when: not (foo == 1 and bar == 0) ==Commands should not change things...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

FAQ

Don't compare to literal True/False

Instead of

when: (foo == 1 and bar == 0) == false

use

when: not (foo == 1 and bar == 0) 

Commands should not change things if nothing needs doing

Sometimes fixed by adding

changed_when: false