From aec4fd1d7a9bb91a141f304ee9f5e85d38a903dc Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Wed, 19 Dec 2018 09:50:53 +0100 Subject: Verify Ansible playbooks via ansible-lint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Id51c2932e126ce1b29e43c95cc786101675bfa99 Signed-off-by: Cédric Ollivier (cherry picked from commit 12fbaf7fa7592a2ef66b0362230a5a57b9052984) --- test-requirements.txt | 1 + tox.ini | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/test-requirements.txt b/test-requirements.txt index 2876290a..c225faad 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -7,4 +7,5 @@ nose>=1.3.7 # LGPL flake8<2.6.0,>=2.5.4 # MIT pylint==1.4.5 # GPLv2 yamllint +ansible-lint bashate>=0.5.1 # Apache-2.0 diff --git a/tox.ini b/tox.ini index dc07ab01..463b456c 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = pep8,pylint,yamllint,bashate,py27 +envlist = pep8,pylint,yamllint,ansiblelint,bashate,py27 [testenv] usedevelop = True @@ -38,6 +38,11 @@ files = commands = yamllint {[testenv:yamllint]files} +[testenv:ansiblelint] +basepython = python2.7 +commands = + ansible-lint ansible/site.yml + [testenv:py36] commands = nosetests functest_kubernetes -- cgit 1.2.3-korg