Skip to content

A dockerized version of Ansible Molecule with docker as the provision driver

License

Notifications You must be signed in to change notification settings

MrSuicideParrot/molecule-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

molecule-docker

GitHub last commit GitHub Workflow Status GitHub Workflow Status renovate

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.

How to use it

Standalone

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

Drone.io

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.sock

Gitlab

You 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

About

A dockerized version of Ansible Molecule with docker as the provision driver

Topics

Resources

License

Stars

Watchers

Forks

Packages