This repository contains style guide for EGIโs use of Ansible. It is meant to complement Ansibleโs own style guide, with a focus on helping developers and maintainers of EGI roles. This style guide will help you to follow to develop roles of high quality and re-usability by assisting in:
Quickstart for the super keen ๐.
Set up your development environment
You will need molecule and the corresponding Ansible release to develop roles.
$virtualenv egi-ansible
New python executable in egi-ansible/bin/python
Installing setuptools, pip, wheel...done.
$source egi-ansible/bin/activate
(egi-ansible)$ pip install molecule
We assume you already have git, python (2 or 3) and pip installed
Clone this repository
git clone https://github.com/EGI-Federation/ansible-style-guide
Use the customised Ansible Galaxy skeleton when developing roles
ansible-galaxy init \
--role-skeleton=ansible-style-guide/egi-galaxy-template/ \
ansible-role-awesome-thing
We have added a lot of extras to the vanilla Ansible Galaxy template. EGIโs Ansible Galaxy role skeleton includes:
- Testing on Travis
- Clean generation of
meta/main.yml
for EGI target platforms - GitHub issue and pull request templates
- Community Health improvement files such as guides for contributors, READMEs and codes of conduct.
Write some failing tests
See the Testing page for more.
Refer to the style guide when reviewing pull requests.
Dive Deeper
The Ansible