ansible-lint: Add tests/inventory and vars.yaml

add fake data for ansible syntax as invoced by tox.ini.

Co-Authored-By: Jesse Keating <omgjlk@us.ibm.com>
Change-Id: Iad8654c53ec6c68db72c40eddda3d79c8f4561dc
This commit is contained in:
Andreas Jaeger 2017-10-28 16:49:01 +02:00
parent 2163671a7b
commit 98664c6ab3
3 changed files with 10 additions and 1 deletions

2
tests/inventory Normal file
View File

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

6
tests/vars.yaml Normal file
View File

@ -0,0 +1,6 @@
site_logs:
fqdn: fake
site_zuulv3_dev:
fqdn: fake
fileserver:
fqdn: fake

View File

@ -38,7 +38,8 @@ commands =
xargs -t -n1 -0 ansible-lint -xANSIBLE0012"
# Ansible Syntax Check
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 \
-e @tests/vars.yaml \{\} + > /dev/null"
[testenv:gerrit]
deps = PyYAML