Skip to content

00/2025

Molecule CI in GitHub Actions

Intro


In the last article we took a look at a fully automated CI for an Ansible role using Molecule. Running this locally works fine during development but to test contentiously against multiple distributions, we need to scale this up a bit. A great and free option are GitHub Actions that run on every new push. This example will stay with testing for AlmaLinux9 and Ubuntu22.04 for the demonstration.

Any files used for this demonstration can be found here @@TODO ensure nice preview

Getting started with Ansible Molecule

Intro


This article is intended as a guide to set up Ansible Molecule for testing Ansible roles by running them against virtual machines. These virtual machines will be controlled by Vagrant using VirtualBox as provider. The code in this guide was developed and tested on AlmaLinux9 and Ubuntu22.04 for the software versions mentioned in Requirements.

All static files used throughout this guide can be found here.