Skip to content

dgnest/cookiecutter-ansible-role

Repository files navigation

Ansible Role Cookiecutter

Build Status GitHub issues Average time to resolve an issue Percentage of issues still open GitHub license

Cookie cutter recipe to easily create ansible roles It infuses antigravity (or maybe not).

Features

  • Follows best practices.
  • Only Creates the necessary files and folders.
  • Blazing fast creation, forget about file creation and focus in actions.

Requirements

  • Linux
    • none
  • OSX
    • none

Usage

cookiecutter https://github.com/dgnest/cookiecutter-ansible-role.git

It begin to ask you configuration variables then you can enter tasks names, handlers names, and default variables.

Inside a Add <some> name i.e (<example>) you can go to next section by entering an empty string.

Example:

ROLE CONFIGURATION:
===================

Should it have files?  [Y/n] y

This will generate this folders (Please note the absence of templates folder):

├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── defaults
│   └── main.yaml
├── files
├── handlers
│   └── main.yaml
├── meta
│   └── main.yml
├── tasks
│   ├── apps.yaml
│   ├── configure.yaml
│   ├── dependences.yaml
│   ├── environment.yaml
│   ├── files.yaml
│   ├── host.yaml
│   ├── include_vars.yaml
│   ├── install.d
│   │   ├── CentOS.yaml
│   │   └── Ubuntu.yaml
│   ├── install.yaml
│   ├── load.yaml
│   ├── main.yaml
│   ├── pip.yaml
│   ├── post_install.yaml
│   └── templates.yaml
├── templates
│   └── default.j2
├── tests
│   ├── inventory
│   └── test.yaml
└── vars
    ├── CentOS.yaml
    ├── Ubuntu.yaml
    └── main.yaml

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Credits

Made with ❤️ ☕ and 🍕 by dgnest