repo-split: Adapt tox to new repo setup for kubespray

Change-Id: Id41e6d07b147c620da05ec38e983e70ef7f93a01
diff --git a/tox.ini b/tox.ini
index 98912c6..c085ead 100644
--- a/tox.ini
+++ b/tox.ini
@@ -2,25 +2,37 @@
 basepython = py36
 minversion = 2.5
 skipsdist = true
-envlist = ansible-lint, shellcheck, yamllint
-install_command = pip install {opts} {packages}
+envlist = ansible-lint, shellcheck, yamllint, docs
+install_command = pip install --force-reinstall {opts} {packages}
 deps = -r{toxinidir}/test-requirements.txt
 
 [testenv:ansible-lint]
+description = invoke ansible-lint to analyse Ansible playbooks and roles
+deps = -r{toxinidir}/test-requirements.txt
 whitelist_externals = bash
+# TODO (fdegir): upstream bifrost file bootstrap.yml in install-configure-bifrost/file
+# excluded from ansible-lint since we can't fix issues in them and they will disappear
+# one they are fixed in upstream
 commands =
-  bash -c "find {toxinidir}/kubespray -type f -regex '.*.ya?ml' ! -regex '.*heat-template.*' -print0 | \
-    xargs -t -n1 -0 ansible-lint --nocolor"
+  bash -c "find {toxinidir} -type f -regex '.*.ya?ml' \
+    ! -regex '.*.tox.*\|.*.venv.*' \
+    -print0 | xargs -t -n1 -0 ansible-lint --nocolor"
 
 [testenv:yamllint]
+description = invoke yamllint to analyse YAML files
+deps = -r{toxinidir}/test-requirements.txt
 whitelist_externals = bash
 commands =
-  bash -c "find {toxinidir}/kubespray -type f -regex '.*.ya?ml' -print0 | \
-    xargs -t -n1 -0 yamllint --format standard --strict"
+  bash -c "find {toxinidir} -type f -regex '.*.ya?ml' \
+    ! -regex '.*.tox.*\|.*.venv.*' \
+    -print0 | xargs -t -n1 -0 yamllint --format standard --strict"
 
 [testenv:shellcheck]
+description = invoke shellcheck to analyse bash shell scripts
+deps = -r{toxinidir}/test-requirements.txt
 whitelist_externals = bash
 commands =
-  bash -c "find {toxinidir}/kubespray -type f -name '*.sh' -print0 | \
-    xargs -t -n1 -0 shellcheck --color=never --source-path={toxinidir}/kubespray \
+  bash -c "find {toxinidir} -type f -regex '.*.sh' \
+    ! -regex '.*.tox.*\|.*.venv.*' \
+    -print0 | xargs -t -n1 -0 shellcheck --color=never --source-path={toxinidir} \
     --external-sources --format=tty"