Testing Ansible Playbooks with Docker using Molecule

Testing Ansible roles and playbooks can be very slow and error-prone if we use the legacy methodology of running it on actual machines repeatedly. Containerisation with Docker offers a good alternative and in this video I lead you through a quick how-to of the various scenarios that I faced while using it myself.

Source code for this video – https://github.com/devopssolver/ansible-molecule-docker

Table of Content:
► 00:12 – Ansible, Docker and Molecule
► 00:21 – Initial Environment Setup
► 01:30 – Ansible roles with Molecule
► 04:03 – Testing with Service Enable Docker Containers
► 05:29 – Custom remote user with Docker and Molecule
► 06:58 – Testing Monolithic Playbooks with Docker and Molecule

► Molecule Docs – https://molecule.readthedocs.io/en/latest/
► Jeff Geerling DockerHub – https://hub.docker.com/u/geerlingguy/


3 thoughts on “Testing Ansible Playbooks with Docker using Molecule”
  1. Nice tutorial but just a suggestion that you need to mention some technical definition in your videos something like what is Molecule, Linting etc. and draw a test diagram to show what are you going to do in follow video. Some of the people will find this informative and helps a lot for your channel. Keep up the great work.

Leave a Reply

Your email address will not be published.

Captcha loading...