Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jgoos/molecule-template-role
This template is intended to provide a quick and easy way to create an ansible role that follows best practices and conventions, and is ready for testing with molecule.
https://github.com/jgoos/molecule-template-role
ansible molecule
Last synced: 23 days ago
JSON representation
This template is intended to provide a quick and easy way to create an ansible role that follows best practices and conventions, and is ready for testing with molecule.
- Host: GitHub
- URL: https://github.com/jgoos/molecule-template-role
- Owner: jgoos
- License: mit
- Created: 2022-06-23T12:06:19.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-01-11T15:06:08.000Z (almost 2 years ago)
- Last Synced: 2023-03-07T17:27:12.066Z (over 1 year ago)
- Topics: ansible, molecule
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ansible Role Template for Molecule Testing
This repository provides a Cookiecutter template for creating an Ansible role that follows best practices and conventions, and is ready for testing with Molecule. The template sets up a directory structure, and testing framework that allows for easy development, testing, and deployment of Ansible roles. The goal is to speed up the role creation process and make it easy to test and maintain your ansible role.
## Customization
You can change the role and scenario name to match your desired role name.
## Usage
1. Install [Cookiecutter](https://cookiecutter.readthedocs.io/en/latest/installation.html)
> **note** `cookiecutter` is bundled with [ansible molecule](https://molecule.readthedocs.io/en/latest/).
2. Clone the repository
`git clone https://github.com//molecule-template-role.git`
3. Run Cookiecutter to create the role
``` bash
$ cookiecutter molecule-template-role # this repo
You have downloaded //.cookiecutters/molecule before. Is it okay to delete and re-download it?
[yes]: yes
role_name [OVERRIDEN]:
scenario_name [default]:
```
4. After the process is completed navigate to the created directory and start using the role, and customize it to fit your needs
5. If you would like to use molecule to test the role please refer to [molecule documentation](https://molecule.readthedocs.io/en/latest/)