Skip to content

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.

License

Notifications You must be signed in to change notification settings

jgoos/molecule-template-role

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

note cookiecutter is bundled with ansible molecule.

  1. Clone the repository

    git clone https://github.com/<your_username>/molecule-template-role.git

  2. Run Cookiecutter to create the role

$ cookiecutter molecule-template-role # this repo
You have downloaded /<home_directory>/.cookiecutters/molecule before. Is it okay to delete and re-download it?
[yes]: yes
role_name [OVERRIDEN]: <role_name example: role_example_name>
scenario_name [default]: <enter>
  1. After the process is completed navigate to the created directory and start using the role, and customize it to fit your needs
  2. If you would like to use molecule to test the role please refer to molecule documentation

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published