ansible-role-zuul/tox.ini
Paul Belanger 7284ca30ac Add tox.ini and ansible-lint cleanup
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-11-20 17:00:24 -05:00

34 lines
801 B
INI

[tox]
minversion = 1.6
envlist = ansible-lint,pep8
skipsdist = True
[testenv]
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
[testenv:ansible-lint]
setenv =
ANSIBLE_CONFIG = tests/ansible.cfg
whitelist_externals = bash
commands =
bash -c "find . -type f -regex '.*.y[a]?ml' -print0 | xargs -t -n1 -0 \
ansible-lint"
bash -c "find tests -type f -regex '.*.y[a]?ml' -print | xargs -t -n1 \
ansible-playbook --syntax-check -i tests/inventory \
-e rolename=$(basename $(pwd)) > /dev/null"
[testenv:ansible-functional]
commands =
ansible-playbook -i tests/inventory tests/test.yaml
passenv = HOME
setenv =
ANSIBLE_CONFIG = {toxinidir}/tests/ansible.cfg
PYTHONUNBUFFERED = 1
[testenv:pep8]
commands = flake8
[testenv:venv]
commands = {posargs}