Verify Ansible playbooks via ansible-lint 57/65957/1
authorCédric Ollivier <cedric.ollivier@orange.com>
Tue, 18 Dec 2018 20:30:53 +0000 (21:30 +0100)
committerCédric Ollivier <cedric.ollivier@orange.com>
Tue, 18 Dec 2018 20:48:45 +0000 (21:48 +0100)
Change-Id: Id8b4553f5d36a52086433f00ce9f846a30212d66
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
(cherry picked from commit 471d030673b2008502c3f5d83d1a16743695bcf4)

test-requirements.txt
tox.ini

index b071f41..0676900 100644 (file)
@@ -9,6 +9,7 @@ pylint # GPLv2
 sphinx!=1.6.6,!=1.6.7 # BSD
 sphinx-rtd-theme
 yamllint
+ansible-lint
 doc8 # Apache-2.0
 bashate # Apache-2.0
 nosehtmloutput # Apache-2.0
diff --git a/tox.ini b/tox.ini
index c411754..ad063b6 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
 [tox]
-envlist = docs,pep8,pylint,yamllint,bashate,py27,perm,cover
+envlist = docs,pep8,pylint,yamllint,ansiblelint,bashate,py27,perm,cover
 
 [testenv]
 usedevelop = True
@@ -88,6 +88,11 @@ files =
 commands =
   yamllint -s {[testenv:yamllint]files}
 
+[testenv:ansiblelint]
+basepython = python2.7
+commands =
+  ansible-lint ansible/site.yml
+
 [testenv:py36]
 dirs =
   functest/tests/unit/ci