summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-12-19 09:50:53 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2019-03-28 07:49:20 +0100
commit6197e0331d353153796cfc9a7c15254f2ec38cd0 (patch)
tree1a15b0bf784bf2bd229397d1e947db207233259c
parent05cf2aedddee7c1d63bb4aa364afe885cdb8fe6f (diff)
Verify Ansible playbooks via ansible-lint
Change-Id: Id51c2932e126ce1b29e43c95cc786101675bfa99 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com> (cherry picked from commit 06f1907ced66589465a09e51216b78eb318ee187)
-rw-r--r--test-requirements.txt1
-rw-r--r--tox.ini7
2 files changed, 7 insertions, 1 deletions
diff --git a/test-requirements.txt b/test-requirements.txt
index 7d6a0ad7..89434493 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -7,4 +7,5 @@ nose # LGPL
flake8<2.6.0,>=2.5.4 # MIT
pylint==1.4.5 # GPLv2
yamllint
+ansible-lint
bashate # Apache-2.0
diff --git a/tox.ini b/tox.ini
index a5caed57..d0a533bd 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
@@ -37,6 +37,11 @@ files =
commands =
yamllint {[testenv:yamllint]files}
+[testenv:ansiblelint]
+basepython = python2.7
+commands =
+ ansible-lint ansible/site.yml
+
[testenv:py36]
commands = nosetests functest_kubernetes