A dockerized version of Ansible Molecule with docker as the provision driver.
This image is automatically compiled everytime there is a new release of ansible, molecule or molecule-docker. To check which version the container is using, see the requirements.txt.
Currently, this image supports amd64 and aarch64.
You can use this image to test roles with molecule on your computer using docker.
docker run --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v $PWD:/ansible ghcr.io/mrsuicideparrot/molecule-docker:latest --help
An example of a pipeline using this image to perform a molecule test on an ansible role.
kind: pipeline
name: default
steps:
- name: molecule
image: ghcr.io/mrsuicideparrot/molecule-docker:latest
pull: true
privileged: true
volumes:
- name: docker-socket
path: /var/run/docker.sock
commands:
- molecule test`
volumes:
- name: docker-socket
host:
path: /var/run/docker.sockYou can use this image on Gitlab by creating the following .gitlab-ci.yml.
---
image: ghcr.io/mrsuicideparrot/molecule-docker:latest
services:
- docker:dind
molecule:
stage: test
script:
- cd roles/testrole && molecule test