2025-03-14 21:59:59 -06:00
|
|
|
# molecule
|
|
|
|
|
|
|
|
|
|
> Molecule helps testing Ansible roles.
|
2025-12-16 10:20:31 -07:00
|
|
|
> More information: <https://docs.ansible.com/projects/molecule/usage/>.
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Create a new Ansible role:
|
|
|
|
|
|
|
|
|
|
`molecule init role --role-name {{role_name}}`
|
|
|
|
|
|
|
|
|
|
- Run tests:
|
|
|
|
|
|
|
|
|
|
`molecule test`
|
|
|
|
|
|
|
|
|
|
- Start the instance:
|
|
|
|
|
|
|
|
|
|
`molecule create`
|
|
|
|
|
|
|
|
|
|
- Configure the instance:
|
|
|
|
|
|
|
|
|
|
`molecule converge`
|
|
|
|
|
|
|
|
|
|
- List scenarios of the instance:
|
|
|
|
|
|
|
|
|
|
`molecule matrix converge`
|
|
|
|
|
|
|
|
|
|
- Log in into the instance:
|
|
|
|
|
|
|
|
|
|
`molecule login`
|