Various distributions with Ansible for testing Ansible roles with Molecule and Travis-CI.
10K+
Linux Images with Ansible for testing Ansible roles with Ansible
Molecule and a continuous integration platform like
GitHub. All images
contain Python, Ansible, SSH, Sudo and an init system (sysvinit or systemd), so
that these images can be used for almost all tests as a replacement for a
full-fledged virtual machine, such as for testing service management
functionality.
The images were built with the help of ansible-bender and the Ansible role coglinev3.ansible_container. Ansible-bender is a tool which bends containers using Ansible playbooks and turns them into container images.
alpine-3.22, latest : Alpine Linux 3.22alpine-3.21 : Alpine Linux 3.21alpine-3.20 : Alpine Linux 3.20alpine-3.19 : Alpine Linux 3.19alpine-3.18 : Alpine Linux 3.18alpine-3.17 : Alpine Linux 3.17alpine-3.16 : Alpine Linux 3.16alpine-3.15 : Alpine Linux 3.15alpine-3.14 : Alpine Linux 3.14amazonlinux-2023 : Amazon Linux 2023almalinux-9 : AlmaLinux 9almalinux-10 : AlmaLinux 10debian-13, debian-trixie : Debian 13 (Trixie)debian-12, debian-bookworm : Debian 12 (Bookworm)debian-11, debian-bullseye : Debian 11 (Bullseye)fedora-42 : Fedore 42fedora-41 : Fedore 41fedora-40 : Fedore 40ubuntu-24.04, ubuntu-jammy : Ubuntu 24.04 LTS (Noble Numbat)ubuntu-22.04, ubuntu-jammy : Ubuntu 22.04 LTS (Jammy Jellyfish)ubuntu-20.04, ubuntu-focal : Ubuntu 20.04 LTS (Focal Fossa)Here is an example playbook to create a Debian 12 image with Ansible and Systemd
---
- name: Containerized version of Debian 12 with ansible
hosts: all
vars:
# configuration specific for ansible-bender
ansible_bender:
base_image: docker.io/library/debian:12
target_image:
# command to run by default when invoking the container
cmd: /bin/systemd
name: "localhost/{{ lookup('env','USER') }}/ansible:debian-12"
labels:
build-by: "{{ lookup('env','USER') }}"
volumes:
- /sys/fs/cgroup
tasks:
- name: include role ansible_container
include_role:
name: ansible_container
vars:
ansible_container_become: false
ansible_container_force_config: "yes"
ansible_container_force_inventory: "yes"
tags:
- stop-layering
The new conatiner image is build with:
ansible-bender build ./playbook.yml
Release: 1.17.0
GNU GPLv3
Copyright © 2020 - 2025 Cogline.v3.
Content type
Image
Digest
sha256:646a5bd82…
Size
101.4 MB
Last updated
7 months ago
docker pull coglinev3/ansible