# Automated testing for Ansible roles with Molecule

**URL:** <https://forum.ansible.com/t/automated-testing-for-ansible-roles-with-molecule/20087>\
**Category:** Ansible Project\
**Created:** [December 29, 2015, 8:23am UTC](https://forum.ansible.com/t/automated-testing-for-ansible-roles-with-molecule/20087 "2015-12-29T08:23:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Borys\_Borysenko](https://avatars.discourse-cdn.com/v4/letter/b/db5fbb/32.png) [@Borys\_Borysenko](https://forum.ansible.com/u/Borys_Borysenko)\
**Post date:** [December 29, 2015, 8:23am UTC](https://forum.ansible.com/t/automated-testing-for-ansible-roles-with-molecule/20087/1 "2015-12-29T08:23:26Z")

</div>

Hello,

A few weeks ago I have discovered an excellent tool named [molecule](https://github.com/metacloud/molecule) that really simplify testing of Ansible roles. I guess it’s really worth to try!

> Molecule is designed to aid in the development and testing of Ansible roles including support for multiple instances, operating system distributions, virtualization providers and test frameworks.

> 

> It leverages Vagrant to manage virtual machines, with support for multiple Vagrant providers (currently VirtualBox and OpenStack). Molecule supports Serverspec or Testinfra to run tests. Molecule uses an Ansible playbook (playbook.yml), to execute the role and its tests.

[Github](https://github.com/metacloud/molecule) | [Documentation](http://molecule.readthedocs.org/en/master/)

There is also a short intro from 2015 OpenStack Summit Tokyo - [Best practices for TDD Ansible and OpenStack deployment](https://www.youtube.com/watch?v=5vKblNaD3fI).

Regards,  
Borys

---

<div class="post-metadata">

**Author:** ![chrismeyersfsu](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/chrismeyersfsu/32/1016_2.png) [@chrismeyersfsu](https://forum.ansible.com/u/chrismeyersfsu)\
**Post date:** [December 30, 2015, 3:09am UTC](https://forum.ansible.com/t/automated-testing-for-ansible-roles-with-molecule/20087/2 "2015-12-30T03:09:23Z")

</div>

I’m trying to figure out how/if this is better than using an Ansible vagrant module.
