Ansible • DevOps • Enterprise CI/CD

Ansible Dev Sandbox

A reproducible testing harness for Ansible role development that mirrors how enterprise environments actually behave. Environment-variable configuration, Molecule test scenarios, and container-based execution — without committing sensitive files.

3 Molecule test scenarios
0 Committed ansible.cfg files
CI Pipeline ready

Enterprise-Grade Role Testing

Test Ansible roles the way they’ll actually run in production environments.

Security

No ansible.cfg Commits

All configuration is driven by environment variables written to a session-scoped .env file. Complies with enterprise security policies that prohibit committed ansible.cfg files.

Testing

Molecule Test Scenarios

Three included scenarios: default, localhost-only, and with-linting. Python unit tests for supporting tooling. Extend or use as-is.

Isolation

Container-Based Execution

Fedora-based container with ephemeral SSH keys generated per run. The sandbox manages container lifecycle automatically — no manual container management.

Security

Vault Inspection

Includes DECRYPT_VAULTED_ITEMS.py for safely inspecting encrypted Ansible vault variables during development without exposing secrets to version control.

CI/CD

Pipeline Ready

One-command activation: python sandbox.py activate && python sandbox.py run. Drop it into any CI pipeline with Python and a container runtime.

Flexibility

Podman or Docker

Supports both Podman and Docker. Works in enterprise environments where Docker may not be available or permitted.

The Problem It Solves

Enterprise Ansible development has constraints that generic sandboxes don’t handle.

The Config Problem

Most Ansible sandbox examples involve committing ansible.cfg to the repo. Enterprise security policies often prohibit this. The Dev Sandbox uses environment variables exclusively.

The Reproducibility Problem

Roles that pass tests on one developer’s machine fail in CI. Container-based execution with ephemeral keys ensures every run starts from a known-good state.

The Testing Gap

Molecule is the right tool for role testing, but setup is complex. The Dev Sandbox provides three working scenarios out of the box — ready to extend or use as-is.

Open Source. Production-Hardened.

The Ansible Dev Sandbox is freely available on GitHub. Need help integrating it into your enterprise CI/CD pipeline or extending it for custom requirements? McIndi can help.