Sign inSign up

coglinev3/ansible

By coglinev3

•Updated 7 months ago

Various distributions with Ansible for testing Ansible roles with Molecule and Travis-CI.

Image
0

10K+

coglinev3/ansible repository overview

⁠container-ansible: Container images with Ansible build by ansible-bender

Build GitHub tag (latest by date) GitHub license

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.

⁠Tags

  • alpine-3.22, latest : Alpine Linux 3.22
  • alpine-3.21 : Alpine Linux 3.21
  • alpine-3.20 : Alpine Linux 3.20
  • alpine-3.19 : Alpine Linux 3.19
  • alpine-3.18 : Alpine Linux 3.18
  • alpine-3.17 : Alpine Linux 3.17
  • alpine-3.16 : Alpine Linux 3.16
  • alpine-3.15 : Alpine Linux 3.15
  • alpine-3.14 : Alpine Linux 3.14
  • amazonlinux-2023 : Amazon Linux 2023
  • almalinux-9 : AlmaLinux 9
  • almalinux-10 : AlmaLinux 10
  • debian-13, debian-trixie : Debian 13 (Trixie)
  • debian-12, debian-bookworm : Debian 12 (Bookworm)
  • debian-11, debian-bullseye : Debian 11 (Bullseye)
  • fedora-42 : Fedore 42
  • fedora-41 : Fedore 41
  • fedora-40 : Fedore 40
  • ubuntu-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)

⁠Example

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

⁠Version

Release: 1.17.0

⁠License

GNU GPLv3

⁠Author Information

Copyright © 2020 - 2025 Cogline.v3.

Tag summary

Content type

Image

Digest

sha256:646a5bd82…

Size

101.4 MB

Last updated

7 months ago

docker pull coglinev3/ansible