From 3e3a3b0ff0313dc88eb7f5f92019b0402eaf64c9 Mon Sep 17 00:00:00 2001 From: Ricardo Carrillo Cruz Date: Wed, 7 Oct 2015 11:02:59 +0200 Subject: [PATCH] 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 --- tox.ini | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index cad7a43..e18ee6c 100644 --- a/tox.ini +++ b/tox.ini @@ -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"