Giter Club home page Giter Club logo

ansible-molecule-cookiecutter's Introduction

Contributors Forks Stargazers Issues GPL3 License LinkedIn Ask Me Anything


Logo

Molecule Cookiecutter Template

This is a template to be used with cookiecuter to create a molecule role
Explore the docs »
Report Bug · Request Feature

Table of Contents

About The Project

Molecule CookieCutter Template

Built With

  • Cookiecutter
  • Molecule
  • Python
  • YAML
  • Ansible
  • JSON
  • Docker

Getting Started

Prerequisites

  • cookiecutter
  • pre-commit
  • molecule-vagrant
  • molecule-docker
  • Vagrant
  • Docker

Installation

Install them doing pip install cookiecutter pre-commit molecule-vagrant molecule-docker


Usage

To initialize the role with cookiecuter

$ pip install cookiecutter pre-commit

$ cookiecutter gh:stiliajohny/ansible-molecule-cookiecutter

To initialize the role with molecule

$ pip install molecule pre-commit

$ molecule init template --url https://github.com/stiliajohny/ansible-molecule-cookiecutter

To test the default scenario docker

$ molecule test

To test the scenario with vagrant

$ molecule test -s vagrant


What this template provides?

  • Initialize a new git repo in the local machine
  • Add .yamllint config file (used by molecule)
  • Add .pre-commit-config.yaml used by pre-commit
  • Add .gitignore with common files I don't want to track in git
  • Add configuration for Molecule in the "molecule" folder
    • default molecule scenario runs on docker
    • There is another molecule scenario using Vagrant
    • The vagrant scenario requires pip install molecule-vagrant
  • Add a travis or Gitlab-CI config file (Optional. By default it's not added)
  • Populates, variables, tasks, handlers on demand
  • Checks role name validity

Directory structure

ansible-role-example/
├── defaults
│   └── main.yml
├── .gitignore
├── handlers
│   └── main.yml
├── meta
│   └── main.yml
├── molecule
│   ├── default
│   │   ├── converge.yml
│   │   ├── INSTALL.rst
│   │   ├── molecule.yml
│   │   └── verify.yml
│   └── vagrant
│       ├── converge.yml
│       ├── INSTALL.rst
│       ├── molecule.yml
│       └── verify.yml
├── .pre-commit-config.yaml
├── README.md
├── tasks
│   └── main.yml
├── vars
│   └── main.yml
└── .yamllint

Roadmap

See the open issues for a list of proposed features (and known issues).


Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the GPL-3.0 License. See LICENSE for more information.

Contact

John Stilia - @john_stilia - [email protected]


Acknowledgements

https://img.shields.io/github/license/othneildrew/Best-README-Template.svg?style=for-the-badge https://img.shields.io/github/license/stiliajohny/Repo-Template.svg?style=for-the-badge

ansible-molecule-cookiecutter's People

Contributors

stiliajohny 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.