Don't compare to literal True/False

With the arrival of ansible-lint 4, comparisons to literal boolean
values are now forbidden. Adjust the new violations accordingly and
remove the rule 601 exclusion.

Change-Id: I18ba2d7d41fabaff35d10d520037188c7d9d1249
changes/97/667697/3
Jeremy Stanley 3 years ago committed by Andreas Jaeger
parent 8624201e0c
commit b6d2616275
  1. 3
      roles/add-build-sshkey/tasks/main.yaml
  2. 2
      roles/build-releasenotes/tasks/main.yaml
  3. 2
      roles/install-kubernetes/tasks/minikube.yaml
  4. 5
      tox.ini

@ -8,5 +8,4 @@
- name: Create a new key in workspace based on build UUID
include: create-key-and-replace.yaml
when:
- zuul_temp_ssh_key_stat.stat.exists != True
when: not zuul_temp_ssh_key_stat.stat.exists

@ -117,7 +117,7 @@
# Remove newly created pot files
rm -f ${DIRECTORY}/source/locale/*.pot
when: translations.stat.exists == True
when: translations.stat.exists
- name: Run releasenotes sphinx build
shell:

@ -8,7 +8,7 @@
url: https://storage.googleapis.com/minikube/releases/{{ minikube_version }}/minikube-linux-amd64
dest: /tmp/minikube
mode: 0755
when: stat_result.stat.exists == False
when: not stat_result.stat.exists
- name: Run install-docker role
include_role:

@ -44,11 +44,10 @@ commands =
# [ANSIBLE0012] Commands should not change things if nothing needs doing
# [204] Lines should be no longer than 160 chars
# [206] Variables should have spaces before and after: {{ var_name }}
# [601] Don't compare to literal True/False
bash -c "find playbooks -type f -regex '.*.ya?ml' -print0 | \
xargs -t -n1 -0 ansible-lint -xANSIBLE0012,204,206,601"
xargs -t -n1 -0 ansible-lint -xANSIBLE0012,204,206"
bash -c 'find roles -maxdepth 1 -mindepth 1 -type d -printf "%p/\n" | \
xargs -t -n1 ansible-lint -xANSIBLE0012,204,206,601'
xargs -t -n1 ansible-lint -xANSIBLE0012,204,206'
# Ansible Syntax Check
bash -c "find playbooks -type f -regex '.*.ya?ml' -exec \
ansible-playbook --syntax-check -i {toxinidir}/tests/inventory \{\} + > /dev/null"

Loading…
Cancel
Save