pytest-ansible
github.com
Spec sheet
- Purpose
- pytest-ansible is a pytest plugin for using Ansible in tests, running Ansible collection unit tests with pytest, and exposing Molecule scenarios through a pytest fixture.Read 8 Oct 2026 · github.com
- Intended users
- The documented use cases focus on Ansible collection authors and people writing pytest tests that call Ansible modules or use Ansible inventory.Read 8 Oct 2026 · github.com
- Audience
- The documentation describes the plugin for Ansible collection authors and developers who want to use Ansible from pytest tests.Read 7 Oct 2026 · docs.ansible.com
- Integrations
- The documented ecosystem includes pytest, Ansible and Ansible collections, and legacy integration with Molecule.Read 7 Oct 2026 · github.com
- Security
- The repository links to a security policy, but the opened project pages do not state security certifications or compliance claims.Read 7 Oct 2026 · github.com
- Support
- The README directs users with problems to file a GitHub issue with a detailed description.Read 8 Oct 2026 · github.com
- License
- The project says it is free and open source under the MIT license.Read 8 Oct 2026 · github.com
- Ansible fixtures
- Legacy fixtures include `ansible_module`, `ansible_adhoc`, `localhost`, and `ansible_facts` for calling modules, working with inventory, and accessing system facts from pytest tests.Read 7 Oct 2026 · github.com
- Collection testing
- Its `pytest-ansible-units` plugin lets users run Ansible collection unit tests with pytest and test individual modules.Read 7 Oct 2026 · github.com
- Deprecation
- The project is deprecated and has a planned end of life in December 2026.Read 8 Oct 2026 · github.com
- Installation
- The README instructs users to install the plugin with pip install pytest-ansible.Read 8 Oct 2026 · github.com
- Legacy fixtures
- Legacy fixtures include ansible_adhoc, ansible_module, localhost, and ansible_facts for interacting with Ansible from pytest tests.Read 8 Oct 2026 · github.com
- Migration guidance
- The project recommends ADE with plain pytest for collection unit tests, tox-ansible for collection CI, and the Molecule CLI for scenarios.Read 8 Oct 2026 · github.com
- Molecule limitation
- The pytest integration for Molecule does not support Molecule shared_state or --workers and is deprecated.Read 8 Oct 2026 · github.com
- Molecule support
- Molecule scenario integration through pytest is deprecated; the README recommends using the Molecule CLI or tox-ansible instead.Read 7 Oct 2026 · github.com
- Requirements
- The project says it supports Python 3.10 or newer and ansible-core 2.14 or newer.Read 7 Oct 2026 · github.com
- Runtime requirements
- The project lists Python 3.10 or newer and ansible-core 2.14 or newer as supported versions.Read 8 Oct 2026 · github.com
- Security policy
- The repository links a security policy, but the opened page did not expose policy details.Read 8 Oct 2026 · github.com
- Unit testing
- Its pytest-ansible-units plugin supports running Ansible collection unit tests with pytest and testing individual Ansible modules in isolation.Read 8 Oct 2026 · github.com
Where Specifiction places it
- Infrastructure Testing Tools#25 of 286.7