Add tox env for ansible syntax check

Looks like the tox macro on project-config requires an env,
thus creating a specific one to infra-ansible tox.ini.
When this lands, I will amend the change on project-config
that adds tox to have envlist value 'ansible-syntax-check'.

Change-Id: Ide54e9d4b614cc687bed293a7835d6055212f7f8
This commit is contained in:
Ricardo Carrillo Cruz 2015-10-07 11:02:59 +02:00
parent 6ebc5060e0
commit 3e3a3b0ff0

View File

@ -4,11 +4,14 @@
# and then run "tox" from this directory.
[tox]
envlist = py27
envlist = ansible-syntax-check
skipsdist = True
[testenv]
deps = -r{toxinidir}/requirements.txt
[testenv:ansible-syntax-check]
changedir = {toxinidir}
deps = -rrequirements.txt
commands = /usr/bin/wget -N https://raw.githubusercontent.com/ansible/ansible/devel/contrib/inventory/openstack.py
commands =
/usr/bin/wget -N https://raw.githubusercontent.com/ansible/ansible/devel/contrib/inventory/openstack.py
/bin/bash -c "/usr/bin/find -maxdepth 1 -name '*.yml' ! -name 'infra_config.yml'| /usr/bin/xargs -n1 ansible-playbook --syntax-check --list-tasks -i hosts"