tox-ansible
A radical approach to testing ansible content
Decision gist · record as of 2026-08-14
Yes. If you maintain or test Ansible collections, this plugin eliminates manual environment setup and matrix configuration. Low install friction, active maintenance, no security vulnerabilities, and MIT licensing. The only gotcha is pre-installing the Python versions you want to test—a standard requirement for any multi-version testing tool.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires tox >=4.2, Python >=3.10, and the specific Python interpreters you want to test against (e.g., python3.11, python3.12) pre-installed on your system.
- Low friction: pure Python wheel with no compiled dependencies.
- Active maintenance—released 2 days ago with last commit 2026-08-14.
License · maintenance · safety
MIT (permissive) — MIT license (permissive) imposes no restrictions on use, modification, or distribution in proprietary or open-source projects.
last release 2026-08-12 (2 days) · last repo commit 2026-08-14 · 72 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 628,645 downloads/mo, #5,672 on PyPI
Alternatives
Verify before relying
pip install tox-ansible
# Add to pyproject.toml:
# [tool.tox]
# requires = ["tox>=4.2"]
# [tool.tox-ansible]
# Then run:
tox list --ansible
tox -e sanity-py3.11-2.14 --ansible- Whether pytest-ansible and pytest-xdist are automatically installed as transitive deps or must be manually added to your test environment.
- Performance characteristics when running tests in parallel across many Ansible versions and Python interpreters.
- Whether coverage reports work correctly with PyPy in addition to CPython.
What it is and what it does
tox-ansible is a tox plugin that generates and manages test environments for Ansible collections, automating the matrix of Python versions and Ansible releases you want to validate against. Instead of manually configuring tox environments for each combination, you declare your test scope in pyproject.toml and the plugin dynamically creates sanity, unit, and integration test environments. It delegates the actual testing to ansible-test (for sanity checks) and pytest (for unit and integration tests), leaving environments intact after runs so you can debug failures locally—and ensuring test outcomes match your CI/CD pipeline.
The plugin uses tox to create isolated virtual environments in .tox/, pyyaml and tomli to parse configuration, and pytest-xdist to parallelize test execution. You control which Python versions and Ansible versions to test via simple configuration flags like skip, coverage, and downstream (to include AAP-supported cores). CalVer versioning (YY.MM.MICRO) means releases track the month they ship, and the plugin is actively maintained with support for Python 3.10, 3.11, 3.12, 3.13, and 3.14.
Use it for
- Test an Ansible collection against multiple Ansible versions and Python interpreters in a single command.
- Run sanity checks on collection code without manually invoking ansible-test, letting tox manage the environment.
- Generate coverage reports for unit tests across collection plugins, with 0% coverage shown for untested files.
- Reproduce CI/CD test failures locally by running the same tox environment names and configurations.
- Skip specific test environments or enable downstream AAP-certified Ansible cores via configuration flags.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
If you maintain or test Ansible collections, this plugin eliminates manual environment setup and matrix configuration. Low install friction, active maintenance, no security vulnerabilities, and MIT licensing. The only gotcha is pre-installing the Python versions you want to test—a standard requirement for any multi-version testing tool.
Install
tox-ansible on PyPI
Before you install
Low friction: pure Python wheel with no compiled dependencies. Active maintenance—released 2 days ago with last commit 2026-08-14. Requires Python >=3.10 and tox >=4.2, plus six runtime test dependencies (pytest, pytest-ansible, pytest-xdist, pyyaml, tomli, tox).
Requires tox >=4.2, Python >=3.10, and the specific Python interpreters you want to test against (e.g., python3.11, python3.12) pre-installed on your system.
License in practice
MIT license (permissive) imposes no restrictions on use, modification, or distribution in proprietary or open-source projects.
Quickstart
pip install tox-ansible
# Add to pyproject.toml:
# [tool.tox]
# requires = ["tox>=4.2"]
# [tool.tox-ansible]
# Then run:
tox list --ansible
tox -e sanity-py3.11-2.14 --ansible
Verify before relying
- Whether pytest-ansible and pytest-xdist are automatically installed as transitive deps or must be manually added to your test environment.
- Performance characteristics when running tests in parallel across many Ansible versions and Python interpreters.
- Whether coverage reports work correctly with PyPy in addition to CPython.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 6 packagespytestpytest-ansiblepytest-xdistpyyamltomlitox |
| Maintenance | Actively maintained 2 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 628,645 / month, #5,672 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Quality AssuranceTopic :: Software Development :: TestingTopic :: Utilities |
Evidence: tox_ansible-26.8.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “tox plugin ansible”
- tox-ansibleA tox plugin that orchestrates testing of Ansible collections across…
- tox-uvtox-uv replaces virtualenv and pip with uv in tox environments,…
- tox-gh-actionsA tox plugin that automatically detects and runs the appropriate test…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also pytest-ansible · ansible-compat · ansible-dev-tools · ansible · molecule · tox-gh · molecule-docker · pytest-testinfra · testinfra · IxNetwork