Merge "Update ansible-lint"

This commit is contained in:
Zuul 2020-01-24 09:33:59 +00:00 committed by Gerrit Code Review
commit 0dba4fbe3b
3 changed files with 7 additions and 6 deletions

View File

@ -9,8 +9,8 @@
- name: Set partition names
set_fact:
swap_partition: "{{ ephemeral_device}}1"
opt_partition: "{{ ephemeral_device}}2"
swap_partition: "{{ ephemeral_device }}1"
opt_partition: "{{ ephemeral_device }}2"
- name: Ensure ephemeral device is unmounted
become: yes

View File

@ -6,5 +6,5 @@ hacking>=2.0.0,<2.1 # Apache-2.0
zuul
ansible>=2.7.0,<2.8
ansible-lint<4
ansible-lint>=4,<=5
bashate>=0.2

View File

@ -35,12 +35,13 @@ setenv =
commands =
flake8 {posargs}
# Ansible lint
# [ANSIBLE0012] Commands should not change things if nothing needs doing
# [301] Commands should not change things if nothing needs doing
# [306] shells with pipe should use pipe
bash -c "find playbooks -type d -name "legacy" -prune -o \
-type f -regex '.*.y[a]ml' -print0 | xargs -t -n1 -0 \
ansible-lint -xANSIBLE0012"
ansible-lint -x301,306"
bash -c 'find roles -maxdepth 1 -mindepth 1 -type d -printf "%p/\n" | \
xargs -t -n1 ansible-lint -xANSIBLE0012'
xargs -t -n1 ansible-lint -x301,306'
# Ansible Syntax Check
bash -c "cd playbooks; find . -type f -regex '.*.y[a]?ml' -exec \
ansible-playbook --syntax-check -i {toxinidir}/tests/inventory \{\} + > /dev/null"