Merge "Advance ansible-lint cap to test with 4"
This commit is contained in:
@@ -12,8 +12,9 @@ zuul
|
|||||||
# dependency solver and the uncapped ansible requirement from
|
# dependency solver and the uncapped ansible requirement from
|
||||||
# ansible-lint pull in the latest version.
|
# ansible-lint pull in the latest version.
|
||||||
ansible>=2.5.1,<2.6 # https://review.openstack.org/567007
|
ansible>=2.5.1,<2.6 # https://review.openstack.org/567007
|
||||||
# We need to pin ansible-lint to before 4.0 which blows up all over the place
|
# Don't automatically switch to ansible-lint 5 when it becomes
|
||||||
ansible-lint<4
|
# available, so that it can be evaluated for an orderly transition.
|
||||||
|
ansible-lint<5
|
||||||
bashate>=0.2
|
bashate>=0.2
|
||||||
stestr>=1.0.0 # Apache-2.0
|
stestr>=1.0.0 # Apache-2.0
|
||||||
# For upload-logs-swift:
|
# For upload-logs-swift:
|
||||||
|
|||||||
7
tox.ini
7
tox.ini
@@ -42,10 +42,13 @@ commands =
|
|||||||
flake8 {posargs}
|
flake8 {posargs}
|
||||||
# Ansible lint
|
# Ansible lint
|
||||||
# [ANSIBLE0012] Commands should not change things if nothing needs doing
|
# [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 | \
|
bash -c "find playbooks -type f -regex '.*.ya?ml' -print0 | \
|
||||||
xargs -t -n1 -0 ansible-lint -xANSIBLE0012"
|
xargs -t -n1 -0 ansible-lint -xANSIBLE0012,204,206,601"
|
||||||
bash -c 'find roles -maxdepth 1 -mindepth 1 -type d -printf "%p/\n" | \
|
bash -c 'find roles -maxdepth 1 -mindepth 1 -type d -printf "%p/\n" | \
|
||||||
xargs -t -n1 ansible-lint -xANSIBLE0012'
|
xargs -t -n1 ansible-lint -xANSIBLE0012,204,206,601'
|
||||||
# Ansible Syntax Check
|
# Ansible Syntax Check
|
||||||
bash -c "find playbooks -type f -regex '.*.ya?ml' -exec \
|
bash -c "find playbooks -type f -regex '.*.ya?ml' -exec \
|
||||||
ansible-playbook --syntax-check -i {toxinidir}/tests/inventory \{\} + > /dev/null"
|
ansible-playbook --syntax-check -i {toxinidir}/tests/inventory \{\} + > /dev/null"
|
||||||
|
|||||||
Reference in New Issue
Block a user