Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

ADR 26010: Adoption of Molecule for Automated Ansible Role Validation

Title

Implementation of the Molecule testing framework with Podman for automated verification of Ansible roles.

Status

Proposed

Date

2026-01-17

Context

With the adoption of Ansible ADR 26009, we require a mechanism to verify that infrastructure changes are correct and idempotent before they are applied to production servers.

Decision

We will adopt Molecule as the primary testing harness for all Ansible roles.

  1. Driver: We will use the molecule-plugins[podman] driver to leverage our local Podman installation for ephemeral test containers.

  2. Lifecycle Automation: Every role will include a molecule/ directory to orchestrate the create, converge, idempotence, and verify stages.

  3. Verification Engine: We will use the Ansible Verifier (Ansible-based test playbooks) to perform functional assertions (e.g., verifying service ports are open and responding).

  4. Systemd Support: Test containers will be configured to run systemd to accurately simulate the production environment and test systemd-managed Podman pods.

Consequences

Positive

Negative

Alternatives

References

Participants

  1. Vadim Rudakov

  2. Senior DevOps Systems Architect (Gemini)