Sunday, October 25, 2026 4,350 lists 78,100 records on file
List your app or device

  1. Home
  2. Infrastructure Testing Tools
  3. pytest-ansible

pytest-ansible

On the record

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

Alternatives to pytest-ansible

Every alternative, ranked