This project provides an opinionated template for bootstrapping an Ansible Collection that extends the minimal structure provided by ansible galaxy collection init
.
By leveraging cookiecutter you will be asked a small number of questions (e.g., namespace, collection name, etc.) which will then be automatically applied to the resulting directory structure.
Note
This template draws inspiration from the Ansible Community GitHub Collection Template.
Warning
This code is NOT supported by Red Hat and may not work as expected.
Red Hat does not guarantee its correctness, reliability, or performance.
Use at your own risk!
$ pip install cookiecutter
$ cookiecutter https://github.com/snapp/template-ansible-collection
Cookiecutter provides a few options for specifying user configurations which can be used to override the template default question values.
Creating a .cookiecutterrc
file in your home directory is the easiest way to specify a user configuration, but you can also pass a config file in at runtime using the --config-file
option.
Note
cookiecutter configuration files are formatted in YAML syntax
Example:
---
default_context:
author: "[email protected]"
namespace: "snapp"
See the Advanced Usage / User Config documentation for more information.
GNU General Public License v3.0 or later.
See LICENSE to see the full text.