https://github.com/ansible/molecule
An ansible-native testing framework for collections, playbooks, and roles with configurable workflows for testing any system or service
https://github.com/ansible/molecule
ansible ansible-dev-tools cookiecutter-ansible hacktoberfest molecule-driver pep-621 podman python supports-dot-config testinfra testing testing-framework
Last synced: 15 days ago
JSON representation
An ansible-native testing framework for collections, playbooks, and roles with configurable workflows for testing any system or service
- Host: GitHub
- URL: https://github.com/ansible/molecule
- Owner: ansible
- License: mit
- Created: 2015-11-18T00:13:28.000Z (about 10 years ago)
- Default Branch: main
- Last Pushed: 2026-01-26T15:01:30.000Z (17 days ago)
- Last Synced: 2026-01-26T23:32:35.923Z (17 days ago)
- Topics: ansible, ansible-dev-tools, cookiecutter-ansible, hacktoberfest, molecule-driver, pep-621, podman, python, supports-dot-config, testinfra, testing, testing-framework
- Language: Python
- Homepage: https://ansible.readthedocs.io/projects/molecule/
- Size: 15.8 MB
- Stars: 4,058
- Watchers: 108
- Forks: 666
- Open Issues: 77
-
Metadata Files:
- Readme: README.md
- Contributing: docs/contributing.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- stars - ansible/molecule - native testing framework for collections, playbooks, and roles with configurable workflows for testing any system or service (HarmonyOS / Windows Manager)
- awesome-modern-devops - Molecule - Test Ansible roles. (IaC)
- awesome-list-ansible - molecule
- awesome-list-docker - molecule
- stars - molecule - native testing framework for collections, playbooks, and roles with configurable workflows for testing any system or service | ansible | 4067 | (Python)
- awesome-repositories - ansible/molecule - An ansible-native testing framework for collections, playbooks, and roles with configurable workflows for testing any system or service (Python)
- awesome-starred - ansible/molecule - An ansible-native testing framework for collections, playbooks, and roles with configurable workflows for testing any system or service (Python)
README
# About Ansible Molecule
[](https://pypi.org/project/molecule/)
[](https://docs.ansible.com/projects/molecule/)
[](https://github.com/ansible-community/molecule/actions)
[](https://github.com/python/black)
[](https://docs.ansible.com/projects/ansible/latest/community/code_of_conduct.html)
[](https://forum.ansible.com/tag/molecule)
[](LICENSE)
Molecule is an Ansible testing framework designed for developing and testing
[Ansible](https://ansible.com) collections, playbooks, and roles.
Molecule leverages standard Ansible features including inventory, playbooks,
and collections to provide flexible testing workflows. Test scenarios can
target any system or service reachable from Ansible, from containers and
virtual machines to cloud infrastructure, hyperscaler services, APIs,
databases, and network devices. Molecule can also validate inventory
configurations and dynamic inventory sources.
Molecule encourages an approach that results in consistently developed
Ansible content that is well-written, easily understood and maintained.
Molecule supports only the latest two major versions of Ansible (N/N-1).
Once installed, the command line can be called using any of the methods
below:
```bash
molecule ...
python3 -m molecule ... # python module calling method
```
# Documentation
Read the documentation and more at .
# Get Involved
See the [Talk to us](https://docs.ansible.com/projects/molecule//contributing/#talk-to-us) section of the documentation to ask questions, find help, and join the conversation.
For complete details, see the
[Ansible communication guide](https://docs.ansible.com/projects/ansible/devel/community/communication.html).
If you want to get moving fast and make a quick patch:
```bash
$ git clone https://github.com/ansible-community/molecule && cd molecule
$ python3 -m venv .venv && source .venv/bin/activate
$ python3 -m pip install -U setuptools pip tox
```
And you're ready to make your changes!
# Authors
Molecule project was created by [Retr0h](https://github.com/retr0h) and
it is now community-maintained as part of the
[Ansible](https://ansible.com) by Red Hat project.
# License
The
[MIT](https://github.com/ansible-community/molecule/blob/main/LICENSE)
License.
The logo is licensed under the [Creative Commons NoDerivatives 4.0
License](https://creativecommons.org/licenses/by-nd/4.0/).
If you have some other use in mind, contact us.