diff --git a/tox.ini b/tox.ini index e19dd85dc..8b9e8bb8b 100644 --- a/tox.ini +++ b/tox.ini @@ -32,12 +32,11 @@ commands = flake8 {posargs} # Ansible lint # [ANSIBLE0012] Commands should not change things if nothing needs doing - bash -c "find playbooks -type d -name "legacy" -prune -o \ - -type f -regex '.*.y[a]ml' -print0 | xargs -t -n1 -0 \ - ansible-lint -xANSIBLE0012" + bash -c "find playbooks -type f -regex '.*.ya?ml' -print0 | \ + xargs -t -n1 -0 ansible-lint -xANSIBLE0012" # Ansible Syntax Check - bash -c "find playbooks -type f -regex '.*.y[a]?ml' -print0 | xargs -n1 -0 \ - ansible-playbook --syntax-check -i tests/inventory 1>/dev/null" + bash -c "find playbooks -type f -regex '.*.ya?ml' -exec \ + ansible-playbook --syntax-check -i {toxinidir}/tests/inventory \{\} + > /dev/null" [testenv:venv] commands = {posargs}