Browse Source

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
changes/20/516020/4
Andreas Jaeger 5 years ago
parent
commit
98664c6ab3
  1. 2
      tests/inventory
  2. 6
      tests/vars.yaml
  3. 3
      tox.ini

2
tests/inventory

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

6
tests/vars.yaml

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

3
tox.ini

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

Loading…
Cancel
Save