From 597ec42e30b02f59f77ce58e6d3112126304a12e Mon Sep 17 00:00:00 2001 From: Ghe Rivero Date: Sat, 22 Oct 2016 10:32:09 +0200 Subject: [PATCH] Add tox environement for ansible check syntax This commits adds tox environments for checking the lampstack ansible syntax. Change-Id: Ia333d222ffb4b10caad1c55ea58b771865cd8de2 --- tox.ini | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tox.ini b/tox.ini index f945be1..6f1887b 100644 --- a/tox.ini +++ b/tox.ini @@ -13,6 +13,7 @@ setenv = ANSIBLE_SSH_CONTROL_PATH = /tmp/%%h-%%r ANSIBLE_INVENTORY = {env:LAMPSTACK_DIR}/hosts ANSIBLE_CONFIG = {env:LAMPSTACK_DIR}/ansible.cfg + ANSIBLE_LOCAL_TEMP = {envtmpdir} deps = setuptools -r{toxinidir}/ansible_requirements.txt @@ -27,3 +28,9 @@ setenv = {[testenv]setenv} ANSIBLE_CALLBACK_WHITELIST = profile_tasks commands = ansible-playbook -vvv -e "action=apply {posargs}" {env:LAMPSTACK_DIR}/site.yml + +[testenv:lampstack-syntax] +setenv = + {[testenv]setenv} +commands = ansible-playbook -vvv --syntax-check {env:LAMPSTACK_DIR}/site.yml -e "action=apply {posargs}" + ansible-playbook -vvv --syntax-check {env:LAMPSTACK_DIR}/site.yml -e "action=destroy {posargs}"