From 66ec61d67c82b9dd9afe0b3bcb197df918c285ec Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 28 Oct 2017 16:56:30 +0200 Subject: [PATCH] Simplify ansible invocations in tox.ini We have no legacy files in here, so no need to skip them. Also, sync invocations of ansible lint and ansible syntax checks. Change-Id: I003cf6a46d1dc376d83118e5e5c405aa54d33f22 --- tox.ini | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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}