Skip to content

Commit 939791a

Browse files
authored
ansible-lint - use changed_when for conditional tasks (#84)
ansible-lint now requires the use of changed_when even for conditional tasks Signed-off-by: Rich Megginson <rmeggins@redhat.com>
1 parent 670281a commit 939791a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tests/tests_user_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@
106106
when:
107107
- ansible_facts['distribution'] not in ['CentOS', 'RedHat'] or
108108
ansible_facts['distribution_version'] | int > 6
109+
changed_when: false
109110

110111
- name: Make sure the effective configuration is expected
111112
assert:

0 commit comments

Comments
 (0)