2023-07-05 22:00:50 +00:00
|
|
|
# This configuration drives both CI and local development.
|
|
|
|
# I use this locally on Ubuntu 22.04, with the following additions
|
2021-01-18 00:02:07 +00:00
|
|
|
#
|
|
|
|
# sudo add-apt-repository ppa:deadsnakes/ppa
|
|
|
|
# sudo apt update
|
2024-04-08 19:02:50 +00:00
|
|
|
# sudo apt install awscli lib{ldap2,sasl2,ssl}-dev python{2,2.7,3} python3.{6..13}{,-venv} python-is-python3 sshpass tox
|
2021-01-18 00:02:07 +00:00
|
|
|
|
2023-08-09 14:27:41 +00:00
|
|
|
# Py A cntrllr A target coverage Django Jinja2 pip psutil pytest tox virtualenv
|
|
|
|
# ==== ========== ========== ========== ========== ========== ========== ========== ========== ========== ==========
|
|
|
|
# 2.4 2.3? <= 3.7.1 <= 1.3.7 <= 1.1 <= 2.1.3 <= 1.4 <= 1.8
|
|
|
|
# 2.5 <= 3.7.1 <= 1.4.22 <= 1.3.1 <= 2.1.3 <= 2.8.7 <= 1.6.1 <= 1.9.1
|
2024-03-17 14:55:15 +00:00
|
|
|
# 2.6 <= 2.6.20 <= 2.12 <= 4.5.4 <= 1.6.11 <= 2.10.3 <= 9.0.3 <= 5.9.0 <= 3.2.5 <= 2.9.1 <= 15.2.0
|
2024-08-11 08:27:15 +00:00
|
|
|
# 2.7 <= 2.11 <= 2.16 <= 5.5 <= 1.11.29 <= 2.11.3 <= 20 <= 4.6.11 <= 3.28 <= 20.15²
|
2024-04-05 18:23:29 +00:00
|
|
|
# 3.5 <= 2.11 <= 2.15 <= 5.5 <= 2.2.28 <= 2.11.3 <= 20 <= 5.9.5 <= 6.1.0 <= 3.28 <= 20.15²
|
2024-08-11 08:27:15 +00:00
|
|
|
# 3.6 <= 2.11 <= 2.16 <= 6.2 <= 3.2.20 <= 3.0.3 <= 21 <= 7.0.1 <= 3.28 <= 20.17²
|
2024-03-06 11:51:12 +00:00
|
|
|
# 3.7 <= 2.12 <= 7.2.7 <= 3.2.20 <= 7.4.4 <= 4.8.0
|
2023-08-09 14:27:41 +00:00
|
|
|
# 3.8 <= 2.12
|
2024-03-17 14:55:15 +00:00
|
|
|
# 3.9 <= 2.15
|
|
|
|
# 3.10
|
|
|
|
# 3.11
|
|
|
|
# 3.12 >= 2.13¹
|
|
|
|
#
|
|
|
|
# Notes
|
|
|
|
# 1. Python 3.12 on a target requires Ansible >= 6 (ansible-core >= 2.13).
|
|
|
|
# Python 3.12 removed support for find_module(), replaced by find_spec().
|
|
|
|
# In Ansible <= 4.x ansible.module_utils.six lacks find_spec().
|
|
|
|
# https://github.com/ansible/ansible/commit/d6e28e68599e703c153914610152cf4492851eb3
|
|
|
|
# In Ansible <= 5.x ansible.utils.collection_loader._AnsibleCollectionFinder
|
|
|
|
# lacks find_spec(). https://github.com/ansible/ansible/pull/76225
|
|
|
|
#
|
|
|
|
# Python 3.12 + get_uri requires Ansible >= 8 (ansible-core >= 2.15).
|
|
|
|
# Python 3.12 removed deprecated httplib.HTTPSConnection() arguments.
|
|
|
|
# https://github.com/ansible/ansible/pull/80751
|
2024-03-06 11:51:12 +00:00
|
|
|
#
|
|
|
|
# 2. Higher virtualenv versions cannot run under this Python version. They can
|
|
|
|
# still generate virtual environments for it.
|
2021-11-10 22:34:32 +00:00
|
|
|
|
|
|
|
# Ansible Dependency
|
|
|
|
# ================== ======================
|
|
|
|
# ansible <= 2.9
|
|
|
|
# ansible == 2.10.* ansible-base ~= 2.10.0
|
|
|
|
# ansible == 3.* ansible-base ~= 2.10.0
|
|
|
|
# ansible == 4.* ansible-core ~= 2.11.0
|
|
|
|
# ansible == 5.* ansible-core ~= 2.12.0
|
2022-06-02 16:48:10 +00:00
|
|
|
# ansible == 6.* ansible-core ~= 2.13.0
|
2024-03-17 14:55:15 +00:00
|
|
|
# ansible == 7.x ansible-core ~= 2.14.0
|
|
|
|
# ansible == 8.x ansible-core ~= 2.15.0
|
|
|
|
# ansible == 9.x ansible-core ~= 2.16.0
|
2024-08-11 08:27:15 +00:00
|
|
|
# ansible == 10.x ansible-core ~= 2.17.0
|
2021-11-10 01:05:37 +00:00
|
|
|
|
2024-09-24 15:50:37 +00:00
|
|
|
# See also
|
|
|
|
# - https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#ansible-core-support-matrix
|
|
|
|
|
2018-03-14 00:23:24 +00:00
|
|
|
[tox]
|
|
|
|
envlist =
|
2019-02-09 20:01:01 +00:00
|
|
|
init,
|
2021-12-08 22:47:28 +00:00
|
|
|
py{27,36}-mode_ansible-ansible{2.10,3,4},
|
2024-03-06 11:51:12 +00:00
|
|
|
py{311}-mode_ansible-ansible{2.10,3,4,5},
|
2024-08-11 08:27:15 +00:00
|
|
|
py{312}-mode_ansible-ansible{6,7,8,9,10},
|
2024-03-06 11:51:12 +00:00
|
|
|
py{27,36,312}-mode_mitogen-distro_centos{6,7,8},
|
|
|
|
py{27,36,312}-mode_mitogen-distro_debian{9,10,11},
|
|
|
|
py{27,36,312}-mode_mitogen-distro_ubuntu{1604,1804,2004},
|
2019-02-09 20:01:01 +00:00
|
|
|
report,
|
2018-03-14 00:23:24 +00:00
|
|
|
|
|
|
|
[testenv]
|
2021-01-18 00:02:07 +00:00
|
|
|
basepython =
|
|
|
|
py26: python2.6
|
|
|
|
py27: python2.7
|
2021-02-21 20:56:59 +00:00
|
|
|
py35: python3.5
|
2021-01-18 00:02:07 +00:00
|
|
|
py36: python3.6
|
|
|
|
py37: python3.7
|
|
|
|
py38: python3.8
|
|
|
|
py39: python3.9
|
2022-04-20 15:27:00 +00:00
|
|
|
py310: python3.10
|
2023-02-21 11:04:28 +00:00
|
|
|
py311: python3.11
|
2024-03-17 14:55:15 +00:00
|
|
|
py312: python3.12
|
2021-11-10 01:05:37 +00:00
|
|
|
deps =
|
|
|
|
-r{toxinidir}/tests/requirements.txt
|
|
|
|
mode_ansible: -r{toxinidir}/tests/ansible/requirements.txt
|
2024-05-03 21:08:14 +00:00
|
|
|
ansible2.10: ansible~=2.10.0
|
|
|
|
ansible3: ansible~=3.0
|
|
|
|
ansible4: ansible~=4.0
|
2024-03-06 11:51:12 +00:00
|
|
|
ansible5: ansible~=5.0
|
|
|
|
ansible6: ansible~=6.0
|
2022-12-13 15:57:37 +00:00
|
|
|
ansible7: ansible~=7.0
|
2024-04-04 14:47:51 +00:00
|
|
|
ansible8: ansible~=8.0
|
2024-04-05 18:23:29 +00:00
|
|
|
ansible9: ansible~=9.0
|
2024-08-11 08:27:15 +00:00
|
|
|
ansible10: ansible~=10.0
|
2021-02-21 20:56:59 +00:00
|
|
|
install_command =
|
2022-04-20 13:10:40 +00:00
|
|
|
python -m pip --no-python-version-warning --disable-pip-version-check install {opts} {packages}
|
2021-01-18 00:02:07 +00:00
|
|
|
commands_pre =
|
|
|
|
mode_debops_common: {toxinidir}/.ci/debops_common_install.py
|
2018-03-14 00:23:24 +00:00
|
|
|
commands =
|
2021-02-21 20:56:59 +00:00
|
|
|
mode_ansible: {toxinidir}/.ci/ansible_tests.py
|
2021-01-18 00:02:07 +00:00
|
|
|
mode_debops_common: {toxinidir}/.ci/debops_common_tests.py
|
2021-11-10 01:05:37 +00:00
|
|
|
mode_localhost: {toxinidir}/.ci/localhost_ansible_tests.py
|
2021-01-18 00:02:07 +00:00
|
|
|
mode_mitogen: {toxinidir}/.ci/mitogen_tests.py
|
|
|
|
passenv =
|
2021-02-21 20:56:59 +00:00
|
|
|
ANSIBLE_*
|
2021-01-18 00:02:07 +00:00
|
|
|
HOME
|
2024-08-10 18:37:25 +00:00
|
|
|
# Azure DevOps, TF_BUILD is set to 'True' when running in a build task
|
|
|
|
# https://learn.microsoft.com/en-us/azure/devops/pipelines/build/variables
|
|
|
|
TF_BUILD
|
2019-02-09 20:01:01 +00:00
|
|
|
setenv =
|
2022-07-04 21:22:17 +00:00
|
|
|
# See also azure-pipelines.yml
|
2022-04-20 13:06:10 +00:00
|
|
|
ANSIBLE_STRATEGY = mitogen_linear
|
2019-02-09 20:01:01 +00:00
|
|
|
NOCOVERAGE_ERASE = 1
|
|
|
|
NOCOVERAGE_REPORT = 1
|
2024-07-29 10:30:25 +00:00
|
|
|
PIP_CONSTRAINT={toxinidir}/tests/constraints.txt
|
2021-11-10 01:05:37 +00:00
|
|
|
# Only applicable to MODE=mitogen
|
2021-01-18 00:02:07 +00:00
|
|
|
distro_centos5: DISTRO=centos5
|
|
|
|
distro_centos6: DISTRO=centos6
|
|
|
|
distro_centos7: DISTRO=centos7
|
2021-02-21 20:56:59 +00:00
|
|
|
distro_centos8: DISTRO=centos8
|
|
|
|
distro_debian9: DISTRO=debian9
|
|
|
|
distro_debian10: DISTRO=debian10
|
|
|
|
distro_debian11: DISTRO=debian11
|
|
|
|
distro_ubuntu1604: DISTRO=ubuntu1604
|
|
|
|
distro_ubuntu1804: DISTRO=ubuntu1804
|
|
|
|
distro_ubuntu2004: DISTRO=ubuntu2004
|
2021-11-10 01:05:37 +00:00
|
|
|
# Note the plural, only applicable to MODE=ansible
|
2024-04-05 18:23:29 +00:00
|
|
|
# Ansible 6 - 8 (ansible-core 2.13 - 2.15) require Python 2.7 or >= 3.5 on targets
|
2022-06-02 16:48:10 +00:00
|
|
|
ansible6: DISTROS=centos7 centos8 debian9 debian10 debian11 ubuntu1604 ubuntu1804 ubuntu2004
|
2022-12-13 15:57:37 +00:00
|
|
|
ansible7: DISTROS=centos7 centos8 debian9 debian10 debian11 ubuntu1604 ubuntu1804 ubuntu2004
|
2024-04-04 14:47:51 +00:00
|
|
|
ansible8: DISTROS=centos7 centos8 debian9 debian10 debian11 ubuntu1604 ubuntu1804 ubuntu2004
|
2024-08-11 08:27:15 +00:00
|
|
|
# Ansible 9 (ansible-core 2.16) requires Python 2.7 or >= 3.6 on targets
|
2024-04-05 18:23:29 +00:00
|
|
|
ansible9: DISTROS=centos7 centos8 debian9 debian10 debian11 ubuntu1804 ubuntu2004
|
2024-08-11 08:27:15 +00:00
|
|
|
# Ansible 10 (ansible-core 2.17) requires Python >= 3.7 on targets
|
|
|
|
ansible10: DISTROS=debian10-py3 debian11-py3 ubuntu2004-py3
|
2021-02-21 20:56:59 +00:00
|
|
|
distros_centos: DISTROS=centos6 centos7 centos8
|
2021-01-18 00:02:07 +00:00
|
|
|
distros_centos5: DISTROS=centos5
|
2021-02-21 20:56:59 +00:00
|
|
|
distros_centos6: DISTROS=centos6
|
|
|
|
distros_centos7: DISTROS=centos7
|
|
|
|
distros_centos8: DISTROS=centos8
|
|
|
|
distros_debian: DISTROS=debian9 debian10 debian11
|
|
|
|
distros_debian9: DISTROS=debian9
|
|
|
|
distros_debian10: DISTROS=debian10
|
|
|
|
distros_debian11: DISTROS=debian11
|
|
|
|
distros_ubuntu: DISTROS=ubuntu1604 ubuntu1804 ubuntu2004
|
|
|
|
distros_ubuntu1604: DISTROS=ubuntu1604
|
|
|
|
distros_ubuntu1804: DISTROS=ubuntu1804
|
|
|
|
distros_ubuntu2004: DISTROS=ubuntu2004
|
2021-01-18 00:02:07 +00:00
|
|
|
mode_ansible: MODE=ansible
|
2024-03-17 14:55:15 +00:00
|
|
|
mode_ansible: ANSIBLE_SKIP_TAGS=resource_intensive
|
2024-04-08 19:03:53 +00:00
|
|
|
mode_ansible: ANSIBLE_CALLBACK_WHITELIST=profile_tasks
|
|
|
|
mode_ansible: ANSIBLE_CALLBACKS_ENABLED=profile_tasks
|
2021-01-18 00:02:07 +00:00
|
|
|
mode_debops_common: MODE=debops_common
|
2024-03-17 14:55:15 +00:00
|
|
|
mode_localhost: ANSIBLE_SKIP_TAGS=issue_776,resource_intensive
|
2021-01-18 00:02:07 +00:00
|
|
|
mode_mitogen: MODE=mitogen
|
2022-04-20 13:06:10 +00:00
|
|
|
strategy_linear: ANSIBLE_STRATEGY=linear
|
2024-03-06 11:51:12 +00:00
|
|
|
allowlist_externals =
|
|
|
|
# Added: Tox 3.18: Tox 4.0+
|
|
|
|
*_install.py
|
|
|
|
*_tests.py
|
|
|
|
aws
|
|
|
|
docker
|
|
|
|
docker-credential-secretservice
|
|
|
|
echo
|
|
|
|
gpg2
|
|
|
|
pass
|
2021-11-10 01:05:37 +00:00
|
|
|
whitelist_externals =
|
2024-03-06 11:51:12 +00:00
|
|
|
# Deprecated: Tox 3.18+; Removed: Tox 4.0
|
|
|
|
*_install.py
|
|
|
|
*_tests.py
|
|
|
|
aws
|
2021-11-10 01:05:37 +00:00
|
|
|
docker
|
|
|
|
docker-credential-secretservice
|
|
|
|
echo
|
|
|
|
gpg2
|
|
|
|
pass
|
2019-02-09 20:01:01 +00:00
|
|
|
|
|
|
|
[testenv:init]
|
2021-01-18 00:02:07 +00:00
|
|
|
basepython = python3
|
2019-02-09 20:01:01 +00:00
|
|
|
commands =
|
|
|
|
coverage erase
|
|
|
|
deps =
|
2021-01-18 00:02:07 +00:00
|
|
|
coverage==4.5.4
|
2019-02-09 20:01:01 +00:00
|
|
|
|
|
|
|
[testenv:report]
|
2021-01-18 00:02:07 +00:00
|
|
|
basepython = python3
|
2019-02-09 20:01:01 +00:00
|
|
|
commands =
|
|
|
|
coverage html
|
|
|
|
echo "coverage report is at file://{toxinidir}/htmlcov/index.html"
|
|
|
|
deps =
|
2021-01-18 00:02:07 +00:00
|
|
|
coverage==4.5.4
|
2019-02-09 20:01:01 +00:00
|
|
|
whitelist_externals =
|
|
|
|
echo
|
2018-03-14 00:23:24 +00:00
|
|
|
|
|
|
|
[testenv:docs]
|
2023-08-15 13:16:11 +00:00
|
|
|
basepython = python3.8
|
2018-03-14 00:23:24 +00:00
|
|
|
changedir = docs
|
|
|
|
commands =
|
|
|
|
sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
|
2023-08-15 13:16:11 +00:00
|
|
|
deps =
|
|
|
|
-r docs/requirements.txt
|