infra-ansible/tox.ini
Ricardo Carrillo Cruz 3e3a3b0ff0 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
2015-10-07 11:02:59 +02:00

18 lines
682 B
INI

# Tox (http://tox.testrun.org/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[tox]
envlist = ansible-syntax-check
skipsdist = True
[testenv]
deps = -r{toxinidir}/requirements.txt
[testenv:ansible-syntax-check]
changedir = {toxinidir}
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"