Skip to content

mrlesmithjr/cookiecutter-ansible-collection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cookiecutter - Ansible Collection

A cookiecutter project template for Ansible collection. By using cookiecutter, consistent Ansible projects can be achieved with common constructs. Many great projects already use cookiecutter behind the scenes (Ansible, Molecule).

Requirements

Usage

Execute the following and answer the relevant questions.

cookiecutter https://github.com/mrlesmithjr/cookiecutter-ansible-collection

Example

In this example we will create an Ansible role for NGINX.

cookiecutter https://github.com/mrlesmithjr/cookiecutter-ansible-collection
...
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:

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.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages