# ansible/molecule

An ansible-native testing framework for collections, playbooks, and roles with configurable workflows for testing any system or service

Repository: https://github.com/ansible/molecule
Canonical: https://ross.abutalabs.com/products/molecule
Homepage: https://ansible.readthedocs.io/projects/molecule/
Language: Python
License: MIT
License Family: permissive
Topics: python, ansible, testing, testing-framework, testinfra, molecule-driver, podman, cookiecutter-ansible, hacktoberfest, supports-dot-config, pep-621, ansible-dev-tools
Last push: 2026-08-26T18:38:16+00:00

## Health v2 (maintenance only)
Score: 94/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 85, longevity 100
- inputs: {"age_days": 3942, "days_push": 7, "days_rel": 21, "gap_med": 41.0, "n_releases_24m": 19}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4132, forks 674 (observed 2026-08-28T04:08:36.093370+00:00)

## What it is
Molecule is an Ansible-native testing framework for developing and testing Ansible collections, playbooks, and roles. It uses standard Ansible features like inventory and playbooks to build configurable test scenarios against containers, VMs, cloud services, and network devices.

## Use cases
- test ansible roles before publishing them
- run integration tests for ansible collections
- verify playbooks against containerized instances
- validate ansible roles across multiple platforms
- test infrastructure automation code in CI
- check dynamic inventory configurations

## When to choose
- you develop Ansible roles, collections, or playbooks and need repeatable tests
- you want scenario-based testing with configurable drivers like Docker or Podman
- you need to test Ansible content against real systems, clouds, or network devices
- you want consistent, maintainable Ansible content development workflows

## When to avoid
- you are not using Ansible for automation
- you need unit testing for general Python code
- you want simple linting only without scenario execution

## Facets
- artifact type: cli-tool
- maturity: active
- function: testing, e2e-testing, cli
- domain: testing, developer-tools
- platform: python, cli, windows
- tags: ansible, testinfra, infrastructure-as-code-testing, molecule-drivers, podman, automation, devops, linux, macos, docker

## Member repositories
- ansible/molecule (main) score 94

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:36.093370+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:23:02.640169+00:00, confidence not recorded.
  - readme: https://github.com/ansible/molecule (fetched 2026-08-28T04:08:36.093370+00:00, sha c9db8e825ed8)
  - registry_pypi: https://pypi.org/pypi/molecule/json (fetched 2026-08-29T09:14:44.862206+00:00, sha ef0e299307a1)
- Data as of 2026-08-30T08:39:29.467469+00:00.
