tox-ansible

26.3.0 · active · verified Tue Apr 14

tox-ansible is a utility designed to simplify the testing of Ansible content collections. Implemented as a tox plugin, it provides a streamlined way to test Ansible content across various Python interpreters and Ansible versions. It leverages tox for environment management, ansible-test sanity for sanity checks, and pytest for unit and integration tests. The current version is 26.3.0, and it follows a regular release cadence, often aligning with other Ansible development tools.

Warnings

Install

Imports

Quickstart

To get started, create an empty `tox-ansible.ini` file in the root of your Ansible collection. Then, list the dynamically generated Ansible testing environments using `tox list --ansible --conf tox-ansible.ini`. To run tests in a specific environment, like `sanity-py3.11-2.14`, execute `tox -e sanity-py3.11-2.14 --ansible --conf tox-ansible.ini`. You can also run all tests of a specific type (e.g., `unit`) across all available environments using `tox -f unit --ansible -p auto --conf tox-ansible.ini`.

touch tox-ansible.ini
tox list --ansible --conf tox-ansible.ini
tox -e sanity-py3.11-2.14 --ansible --conf tox-ansible.ini

view raw JSON →