ARCHIVED – Superseded by https://github.com/DominiqueFuchs/DiD
This repository provides Docker images pre-configured for testing Ansible roles, particularly with Molecule. The images are automatically built and published to Docker Hub via GitHub Actions.
These Docker images were initially created for and are used by my other repo ansible-grafana-compose. This Ansible role deploys a Grafana, Prometheus, Loki, and Alertmanager stack using Docker Compose, leveraging these images for its Molecule testing scenarios.
The following base images are available, each equipped with Ansible and other testing essentials:
- AlmaLinux:
dfuchs/alma-8-ansible(AlmaLinux 8)dfuchs/alma-9-ansible(AlmaLinux 9)
- Debian:
dfuchs/debian-12-ansible(Debian 12 Bookworm)dfuchs/debian-11-ansible(Debian 11 Bullseye)
- Ubuntu:
dfuchs/ubuntu-24.04-ansible(Ubuntu 24.04 LTS Noble Numbat)dfuchs/ubuntu-22.04-ansible(Ubuntu 22.04 LTS Jammy Jellyfish)
Each image comes with:
- Ansible: Latest version installed via pip.
- Python 3 & pip: For Ansible and general scripting.
sudo: For privilege escalation.- Docker Engine (CE): For roles that might interact with Docker.
- Docker Compose (plugin): For managing multi-container applications within tests.
systemd: Enabled in the base images to allow testing of service management.
latest: Each image currently tracks the latest available version of its base distribution and has a singlelatesttag.
You can use these images in your molecule.yml file:
dependency:
name: galaxy
driver:
name: docker
platforms:
- name: instance
image: dfuchs/ubuntu-24.04-ansible:latest
pre_build_image: true
override_command: false
privileged: true # For systemd, in conjunction with the cgroup mount
volume_mounts:
- "/sys/fs/cgroup:/sys/fs/cgroup:ro"
provisioner:
name: ansible
verifier:
name: ansible