Update ansible-lint
I started looking at this because what I thought was an ansible-lint bug is an ansible bug (you can't use a apostrophe in shell comments?!...) Anyway, the ignore numbers have changed and we don't need to enforce pipefail. Otherwise it found some variable typos. [1] https://github.com/ansible/ansible/issues/28674 Change-Id: I35315c82200686841a9b1d4c87c7f27a71bd8931
This commit is contained in:
parent
2a0922bfe0
commit
0bbbe0e9b1
@ -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
|
||||
|
@ -6,6 +6,6 @@ hacking>=1.1.0,<1.2 # Apache-2.0
|
||||
|
||||
zuul
|
||||
ansible>=2.7.0,<2.8
|
||||
ansible-lint<4
|
||||
ansible-lint>=4,<=5
|
||||
bashate>=0.2
|
||||
zuul-sphinx>=0.2.0
|
||||
|
7
tox.ini
7
tox.ini
@ -32,12 +32,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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user