Giter Site home page Giter Site logo

candido / cookiecutter-ansible-role Goto Github PK

View Code? Open in Web Editor NEW

This project forked from idealista/cookiecutter-ansible-role

0.0 1.0 0.0 170 KB

Cookiecutter template for creating ansible roles easily.

License: Apache License 2.0

Shell 23.85% Python 35.18% Jinja 40.97%

cookiecutter-ansible-role's Introduction

Cookiecutter Ansible Role

Logo

Build Status

This cookiecutter generates an ansible role.

Getting Started

These instructions will get you an Ansible Role generated using Cookiecutter.

This cookiecutter:

  • Follows the best practices
  • Asks you if some features are wanted or not in the role
  • Generates a Pipfile and Pipfile.lock for using the role based on some parameters

Prerequisities

You just need to have pipenv installed.

Usage

To generate your ansible role type printf "cookiecutter==1.7.2\nJinja2==2.11.2" > requirements.txt && pipenv install -r requirements.txt && pipenv run cookiecutter https://github.com/idealista/cookiecutter-ansible-role && rm -rf Pipfile* requirements.txt && pipenv --rm && rm -rf requirements.txt.

Then, introduce some parameters needed for generating it.

It displays some comments that help you to use the cookiecutter sucessfully, if you assign value to them nothing happens.

comment_0 [The role name will be the value you assign to app_name with _role appended]:
comment_1 [Introduce in exec_name the executable file name, you can change it later in the defaults/main.yml if you don't know it]:
app_name []: github_cli
exec_name []: gh
github_user [idealista]:
company [Idealista S.A.U.]:
author []: pablogcaldito
min_ansible_version []: 2.2
ansible_version []: 5.2.0
molecule_version []: 3.4.0
python_docker_version []: 5.0.0
molecule_docker_version []: 0.2.4
ansible_lint_version []: 5.3.2
yamllint_version []: 1.28.0
license [Apache 2.0]:
galaxy_tag_1 [example_tag1]: github_cli
galaxy_tag_2 [example_tag2]: github
galaxy_tag_3 [example_tag3]: cli
Select debian_bullseye_support:
1 - True
2 - False
Choose from 1, 2 [1]:
Select debian_buster_support:
1 - True
2 - False
Choose from 1, 2 [1]:
Select has_service:
1 - True
2 - False
Choose from 1, 2 [1]:
Select has_files:
1 - True
2 - False
Choose from 1, 2 [1]:
comment_2 [If there is service the following options will not have any effect]:
Select has_handlers:
1 - True
2 - False
Choose from 1, 2 [1]:
Select has_templates:
1 - True
2 - False
Choose from 1, 2 [1]:
documentation_URL: https://cli.github.com/manual/

It will create the following file structure:

github_cli_role
├── CHANGELOG.md
├── defaults
│   └── main.yml
├── files
├── handlers
│   └── main.yml
├── LICENSE
├── logo.gif
├── meta
│   └── main.yml
├── molecule
│   └── default
│       ├── converge.yml
│       ├── Dockerfile.j2
│       ├── molecule.yml
│       ├── tests
│       │   └── test_app.yml
│       └── verify.yml
├── Pipfile
├── Pipfile.lock
├── README.md
├── tasks
│   ├── config.yml
│   ├── install.yml
│   ├── main.yml
│   └── service.yml
├── templates
│   └── github_cli.service.j2
└── test-requirements.txt

Testing

Test the cookiecutter just by typing:

./test.sh

Built With

Cookiecutter Python 3

Versioning

For the versions available, see the tags on this repository.

Additionaly you can see what change in each version in the CHANGELOG.md file.

Authors

See also the list of contributors who participated in this project.

License

Apache 2.0 License

This project is licensed under the Apache 2.0 license - see the LICENSE file for details.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

cookiecutter-ansible-role's People

Contributors

vicsufer avatar blalop avatar caldito avatar xtianae7 avatar dortegau avatar adrian-arapiles avatar santi-eidu avatar ultraheroe avatar emepege avatar marionv91 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.