Verify the Ansible playbook via ansible-lint 93/65893/1
authorCédric Ollivier <cedric.ollivier@orange.com>
Sat, 15 Dec 2018 14:58:56 +0000 (15:58 +0100)
committerCédric Ollivier <cedric.ollivier@orange.com>
Sun, 16 Dec 2018 06:32:42 +0000 (07:32 +0100)
Change-Id: I9e6778b935a0a8d6e76cb4f1f16ef08c811eee73
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
(cherry picked from commit e3d5138f69bbffdff063019dc35c4b760b2c9564)

test-requirements.txt
tox.ini

index 2beb360..0a79714 100644 (file)
@@ -11,3 +11,4 @@ sphinx-rtd-theme
 yamllint
 doc8>=0.6.0 # Apache-2.0
 bashate>=0.5.1 # Apache-2.0
+ansible-lint
diff --git a/tox.ini b/tox.ini
index e76005b..24ce6b8 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
 skipsdist = True
 
 [testenv]
@@ -43,6 +43,11 @@ files =
 commands =
   yamllint -s {[testenv:yamllint]files}
 
+[testenv:ansiblelint]
+basepython = python2.7
+commands =
+  ansible-lint ansible/site.yml
+
 [testenv:py36]
 commands = nosetests xtesting/tests/unit