Cookiecutter recipe to easily create ansible roles. This is a fork from ferrarimarco/cookiecutter-ansible-role
- Follows Ansible best practices
- Follows Ansible Galaxy best practices
- Only Creates the necessary files and folders
- Blazing fast creation, forget about file creation and focus in actions
- Lint checks (Ansible-lint, yamllint)
- Travis-CI integration ready, with support for parallel builds: (.travis.yml, badges in README.md for development and master branches)
- Install cookiecutter:
pip install cookiecutter
cookiecutter https://github.com/jobcespedes/cookiecutter-ansible-role
It will ask you questions about the structure of your role like tasks names, handlers names, and default variables. You can jump to the next question by entering an empty string.
See README.md of the generated role.
ROLE CONFIGURATION:
===================
Should it have tasks? [Y/n]
Add task name i.e (Install packages) Add some task
Add task name i.e (Install packages) another task
Add task name i.e (Install packages)
Should it have handlers? [Y/n]
Add handler name i.e (Restart uwsgi) restart something
Add handler name i.e (Restart uwsgi) alert someone
Add handler name i.e (Restart uwsgi)
It should contain default variables?: [Y/n]
Add variable i.e (operator: : drunken_master) var: name
Add variable i.e (operator: : drunken_master)
Should it have meta info? [Y/n]
- Should it have dependencies? [Y/n]
Add dependency i.e ({role: aptsupercow, var: 'value'}) {role: cool, version: latest}
Add dependency i.e ({role: aptsupercow, var: 'value'})
Should it have templates? [Y/n] n
Should it have files? [Y/n] y