This repository has been archived on 2025-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
oliverdavies.uk-old-sculpin/source/_posts/test-driven-ansible-role-development-molecule.md
Oliver Davies 85a10c545b Run prettier on all *.md files
```
prettier '{app,source}/**/**.md' --write
```
2020-03-08 17:57:45 +00:00

1.7 KiB
Raw Blame History

title date excerpt tags
Test Driven Ansible Role Development with Molecule 2019-06-02 Some resources that I found for testing Ansible roles with a tool called Molecule.
ansible
molecule
testing
video

I used to maintain a number of Ansible roles, and I recently wrote one for automatically generating settings.php files for Drupal projects that I use for some client projects as part of the Ansible and Ansistrano deployment process, as it can populate these files with credentials stored in Ansible Vault.

I uploaded an initial version of the role onto GitHub, but havent yet released it onto Ansible Galaxy.

Id seen in other peoples roles and read elsewhere about writing automated tests for Ansible roles using a tool called Molecule, and wanted to write some tests for this role before publishing it onto Galaxy.

I looked around for resources about Molecule, and found a blog post by Jeff Geerling, but also this YouTube video that I found very helpful.

Ive since been re-writing the role from scratch based on Molecule, and plan to release an official version of it soon.

{% include 'video-embed' with { classes: 'video-full', video: { id: 'DAnMyBZ8-Qs', attr: { height: '315', width: '560', } } } %}