An Inspec profile for asserting compliance withe the EGI Ansible Style Guide
This is an InSpec profile, which tests compliance with the EGI Ansible Style.
This profile is meant to guide developers of Ansible roles for use in the EGI
federation write them consistently with a consensus-based
style guide.
We implement controls for:
according to the Ansible style guide in use.
TL;DR: set a few variables, run the profile:
export GITHUB_TOKEN=super_secret_token
export GITHUB_REPO=cmd
(this should be a repo under the @EGI-Federation org)inspec supermarket exec brucellino/ansible-style-guide
inspec exec -b local http://github.com/EGI-Federation/ansible-fashion-police
This profile should be included in your continuous integration pipeline.
You will need Inspec to use this profile.
This implies a ruby ( ~> 2.4) runtime environment and the necessary gems.
gem install bundler
bundle
This profile expects the role to be in GitHub repository, configured according to good practice.
If you use the Ansible Galaxy skeleton provided by the style guide you should be fine
If you are developing a new Ansible role locally and want to use this profile, you’re going to have control failures for aspects of the repo configuration (master branch protection, labels, etc).
You can disable these controls temporarily - see the Inspec docs.
We’re not taking contributions right now.