83ced7f6e6
Make inventory/service for service-specific things, including the groups.yaml group definitions, and inventory/base for hostvars related to the base system, including the list of hosts. Move the exisitng host_vars into inventory/service, since most of them are likely service-specific. Move group_vars/all.yaml into base/group_vars as almost all of it is related to base things, with the execption of the gerrit public key. A followup patch will move host-specific values into equivilent files in inventory/base. This should let us override hostvars in gate jobs. It should also allow us to do better file matchers - and to be able to organize our playbooks move if we want to. Depends-On: https://review.opendev.org/731583 Change-Id: Iddf57b5be47c2e9de16b83a1bc83bee25db995cf
46 lines
1.5 KiB
INI
46 lines
1.5 KiB
INI
[tox]
|
|
minversion = 1.6
|
|
envlist = linters
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
basepython = python3
|
|
usedevelop = True
|
|
install_command = pip install {opts} {packages}
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
|
|
[testenv:linters]
|
|
whitelist_externals = bash
|
|
setenv =
|
|
ANSIBLE_LIBRARY= {toxinidir}/tools/fake-ansible/library
|
|
commands =
|
|
flake8
|
|
{toxinidir}/tools/run-bashate.sh
|
|
python3 {toxinidir}/tools/sorted_modules_env.py {toxinidir}/modules.env
|
|
python3 {toxinidir}/tools/irc_checks.py
|
|
python3 {toxinidir}/tools/check_clouds_yaml.py
|
|
# The following command validates that inventory/base/hosts.yaml
|
|
# parses, but doesn't do anything.
|
|
bash -c "ANSIBLE_INVENTORY_PLUGINS=./playbooks/roles/install-ansible/files/inventory_plugins ansible -i ./inventory/base/hosts.yaml not_a_host -a 'true'"
|
|
python3 -m unittest playbooks/roles/install-ansible/files/inventory_plugins/test_yamlgroup.py
|
|
bash -c "find roles playbooks -type f -regex '.*.y[a]?ml' -print0 | xargs -t -n1 -0 ansible-lint"
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:docs]
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
commands = sphinx-build -W -E -b html doc/source doc/build/html
|
|
|
|
[testenv:testinfra]
|
|
# This environment assumes a gate-hosts.yaml file has been written.
|
|
passenv =
|
|
TESTINFRA_EXTRA_DATA
|
|
commands = py.test --junit-xml junit.xml --connection=ansible --ansible-inventory=/home/zuul/src/opendev.org/opendev/system-config/inventory/base/gate-hosts.yaml -v testinfra {posargs}
|
|
|
|
[flake8]
|
|
show-source = True
|
|
exclude = .tox,.eggs
|
|
ignore = E125,H
|
|
select = H231
|