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
- Getting Started
- Usage
- What this template provides?
- Directory structure
- Roadmap
- Contributing
- License
- Contact
- Acknowledgements
- Cookiecutter
- Molecule
- Python
- YAML
- Ansible
- JSON
- Docker
- Ansible-lint
- Yamllint
- Ansible
- ansible-lint
- yamllint
- cookiecutter
- pre-commit
- molecule-vagrant
- molecule-docker
- vagrant
- docker
- ansible ==>
$ pip3 install ansible
- ansible-lint ==>
$ pip3 install ansible-lint
- yamllint ==>
$ pip3 install cookiecutter
- cookiecutter ==>
$ pip3 install cookiecutter
- pre-commit ==>
$ pip3 install pre-commit
- molecule ==>
$ pip3 install molecule
- molecule-vagrant ==>
$ pip3 install molecule-vagrant python-vagrant
- molecule-docker ==>
$ pip3 install molecule-docker
- Vagrant ==> Official Documentation
- Docker ==> Official Documentation
$ cookiecutter gh:stiliajohny/cookiecutter-collection --directory="ansible"
$ molecule test
$ molecule test -s vagrant
- 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
ansible-role-example/
├── defaults
│ └── main.yml
├── .gitignore
├── handlers
│ └── main.yml
├── meta
│ └── main.yml
├── molecule
│ ├── default
│ │ ├── converge.yml
│ │ ├── INSTALL.rst
│ │ ├── molecule.yml
│ │ └── verify.yml
│ ├── docker
│ │ ├── 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
See the open issues for a list of proposed features (and known issues).
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.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the GPL-3.0 License. See LICENSE
for more information.
John Stilia - @john_stilia - stilia.johny@gmail.com