Be consistent about spaces before and after vars
With the arrival of ansible-lint 4, Jinja2 variable expansions must include spaces before and after the variable name inside the brackets. Adjust the new violations accordingly and remove the rule 206 exclusion. Change-Id: Ib3ff7b0233a5d5cf99772f9c2adc81861cf34ffa
This commit is contained in:
parent
4a1ecf50a5
commit
2711d10186
@ -15,7 +15,7 @@ zuul
|
||||
ansible>=2.5.1,<2.6 # https://review.openstack.org/567007
|
||||
# Don't automatically switch to ansible-lint 5 when it becomes
|
||||
# available, so that it can be evaluated for an orderly transition.
|
||||
ansible-lint<5
|
||||
ansible-lint>=4.1.1a0,<5
|
||||
bashate>=0.2
|
||||
stestr>=1.0.0 # Apache-2.0
|
||||
# For upload-logs-swift:
|
||||
|
5
tox.ini
5
tox.ini
@ -43,11 +43,10 @@ commands =
|
||||
# Ansible lint
|
||||
# [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 }}
|
||||
bash -c "find playbooks -type f -regex '.*.ya?ml' -print0 | \
|
||||
xargs -t -n1 -0 ansible-lint -xANSIBLE0012,204,206"
|
||||
xargs -t -n1 -0 ansible-lint -xANSIBLE0012,204"
|
||||
bash -c 'find roles -maxdepth 1 -mindepth 1 -type d -printf "%p/\n" | \
|
||||
xargs -t -n1 ansible-lint -xANSIBLE0012,204,206'
|
||||
xargs -t -n1 ansible-lint -xANSIBLE0012,204'
|
||||
# Ansible Syntax Check
|
||||
bash -c "find playbooks -type f -regex '.*.ya?ml' -exec \
|
||||
ansible-playbook --syntax-check -i {toxinidir}/tests/inventory \{\} + > /dev/null"
|
||||
|
Loading…
Reference in New Issue
Block a user