diff --git a/tests/inventory b/tests/inventory new file mode 100644 index 000000000..68b2dac3b --- /dev/null +++ b/tests/inventory @@ -0,0 +1,2 @@ +[all] +localhost diff --git a/tox.ini b/tox.ini index f4086d9c5..5c8a2282c 100644 --- a/tox.ini +++ b/tox.ini @@ -31,6 +31,9 @@ commands = # ANSIBlE0012: Commands should not change things if nothing needs doing bash -c "cd playbooks; find . -type f -regex '.*.y[a]?ml' -print0 | xargs -t -n1 -0 \ ansible-lint -x ANSIBLE0012" + # Ansible Syntax Check + bash -c "find playbooks -type f -regex '.*.y[a]?ml' -print | xargs -t -n1 \ + ansible-playbook --syntax-check -i tests/inventory > /dev/null" [testenv:venv] commands = {posargs}