Include ansible-playbook syntax-check for tox pep8

Syntax check our playbooks / roles when we run pep8. This way we can
quickly tests if our playbooks are valid.

Change-Id: I2f4e3f617922c8578adb53e2c4a418488fcf230b
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2017-07-14 17:02:05 -04:00
parent c0c9653ab5
commit ea35d7ffc9
No known key found for this signature in database
GPG Key ID: 611A80832067AF38
2 changed files with 5 additions and 0 deletions

2
tests/inventory Normal file
View File

@ -0,0 +1,2 @@
[all]
localhost

View File

@ -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}