Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mrlesmithjr/cookiecutter-ansible-role
A cookiecutter project template for Ansible roles
https://github.com/mrlesmithjr/cookiecutter-ansible-role
ansible ansible-role
Last synced: about 1 month ago
JSON representation
A cookiecutter project template for Ansible roles
- Host: GitHub
- URL: https://github.com/mrlesmithjr/cookiecutter-ansible-role
- Owner: mrlesmithjr
- License: mit
- Created: 2020-02-10T02:48:54.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-02-17T03:54:56.000Z (9 months ago)
- Last Synced: 2024-02-17T04:29:27.683Z (9 months ago)
- Topics: ansible, ansible-role
- Size: 601 KB
- Stars: 19
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Cookiecutter - Ansible Role
A cookiecutter project template for Ansible roles. By using [cookiecutter](https://cookiecutter.readthedocs.io/en/latest/), consistent Ansible projects can be
achieved with common constructs. Many great projects already use cookiecutter
behind the scenes (Ansible, Molecule).## Requirements
- [cookiecutter](https://cookiecutter.readthedocs.io/en/latest/installation.html)
## Usage
Execute the following and answer the relevant questions.
```bash
cookiecutter https://github.com/mrlesmithjr/cookiecutter-ansible-role
```### Example
In this example we will create an Ansible role for NGINX.
```bash
cookiecutter https://github.com/mrlesmithjr/cookiecutter-ansible-role
...
role_name [Enter Ansible role name]: test-role
description [Enter description of Ansible role]: A test role
author [Your Name]: Larry Smith Jr.
company [Enter company name]:
email [[email protected]]: [email protected]
website [http://example.com]: http://everythingshouldbevirtual.com
twitter [example]: mrlesmithjr
Select license:
1 - MIT
2 - BSD-3
3 - Apache Software License 2.0
Choose from 1, 2, 3 [1]:
min_ansible_version [2.8]:
year [2020]:
github_username [Enter your GitHub username]: mrlesmithjr
travis_username [Enter your Travis CI username]: mrlesmithjr
Select default_ci_badges:
1 - Y
2 - N
Choose from 1, 2 [1]:
```Once the above is completed our new nginx directory will look similar to:
```bash
test-role
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── CONTRIBUTORS.md
├── LICENSE.md
├── README.md
├── defaults
│ └── main.yml
├── files
├── handlers
│ └── main.yml
├── meta
│ └── main.yml
├── molecule
│ ├── default
│ │ ├── Dockerfile.j2
│ │ ├── INSTALL.rst
│ │ └── molecule.yml
│ ├── shared
│ │ ├── playbook.yml
│ │ └── tests
│ │ ├── __pycache__
│ │ │ └── test_default.cpython-37.pyc
│ │ └── test_default.py
│ └── vagrant
│ ├── INSTALL.rst
│ ├── molecule.yml
│ ├── prepare.yml
│ └── tests
│ └── __pycache__
│ └── test_default.cpython-37.pyc
├── playbook.yml
├── requirements-dev.txt
├── requirements.txt
├── requirements.yml
├── tasks
│ └── main.yml
├── templates
└── vars
└── main.yml
```## Licensing
The current licensing model is MIT by default.
## Author Information
Larry Smith Jr.
- [@mrlesmithjr](https://twitter.com/mrlesmithjr)
- [EverythingShouldBeVirtual](http://everythingshouldbevirtual.com)
- [[email protected]](mailto:[email protected])