adc37970ab
This change adds a flag 'generate_keypair' that makes the role to generate an ssh keypair, create an OpenStack keypair with it and all the servers of the play will have that key baked in. The folder, key type and key length are also configurable. Change-Id: Iccbec24e9834c1fa03da8add94e069f622024537
48 lines
1.1 KiB
INI
48 lines
1.1 KiB
INI
[tox]
|
|
minversion = 1.4.2
|
|
envlist = docs,linters
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
[testenv:functional]
|
|
commands =
|
|
ansible-playbook -i tests/inventory tests/test.yaml \
|
|
-e "@tests/resources.yml"
|
|
passenv = HOME
|
|
setenv =
|
|
ANSIBLE_CONFIG = {toxinidir}/tests/ansible.cfg
|
|
PYTHONUNBUFFERED = 1
|
|
|
|
[testenv:docs]
|
|
commands = python setup.py build_sphinx
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[flake8]
|
|
# E123, E125 skipped as they are invalid PEP-8.
|
|
|
|
show-source = True
|
|
ignore = E123,E125
|
|
builtins = _
|
|
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build
|
|
|
|
[testenv:linters]
|
|
setenv =
|
|
ANSIBLE_CONFIG = tests/ansible.cfg
|
|
whitelist_externals = bash
|
|
commands =
|
|
# PEP8 Lint Check
|
|
flake8
|
|
# Ansible Lint Check
|
|
bash -c "find . -type f -regex '.*.y[a]?ml' ! -path './.tox/*' -print0 | xargs -t -n1 -0 \
|
|
ansible-lint"
|
|
# Ansible Syntax Check
|
|
bash -c "find tests -type f -regex '.*.y[a]?ml' ! -name 'resources.yml' \
|
|
-print | xargs -t -n1 \
|
|
ansible-playbook --syntax-check -i tests/inventory \
|
|
-e rolename=$(basename $(pwd)) > /dev/null"
|