ansible-playbooks/tox.ini
Bart Wensley 46be1e020a Enable yamllint for ansible playbook .yml files
Enabling yamllint for the ansible playbook .yml files. Modified
the default yamllint configuration to ignore some minor issues
so yamllint will pass. Made some very basic formatting changes
to the playbook files to address basic warnings/errors and
get the maximum line length to 125 characters.

Change-Id: I3b6adf77025dceeb168222ff154a98178d2bb7aa
Story: 2004695
Task: 34286
Signed-off-by: Bart Wensley <barton.wensley@windriver.com>
2019-06-24 13:27:26 -05:00

55 lines
1.4 KiB
INI

[tox]
envlist = linters,pep8
minversion = 2.3
skipsdist = True
[testenv]
install_command = pip install -U {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
OS_STDOUT_CAPTURE=1
OS_STDERR_CAPTURE=1
OS_TEST_TIMEOUT=60
deps = -r{toxinidir}/test-requirements.txt
[testenv:linters]
basepython = python3
whitelist_externals = bash
commands =
bash -c "find {toxinidir} \
-not \( -type d -name .?\* -prune \) \
-type f \
-not -name \*~ \
-not -name \*.md \
-name \*.sh \
-print0 | xargs -r -n 1 -0 bashate -v"
bash -c "find {toxinidir} \
-path '{toxinidir}/.tox' -a -prune \
-o -name '*.yaml' \
-o -name '*.yml' \
-print0 | xargs -0 yamllint"
[testenv:pep8]
basepython = python3
usedevelop = False
description =
Run style checks.
commands =
flake8
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
# E501 skipped because some of the code files include templates
# that end up quite wide
# H405: multi line docstring summary not separated with an empty line
show-source = True
ignore = E123,E125,E501,H405,W504
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,release-tag-*
[testenv:venv]
basepython = python3
commands = {posargs}