Wednesday, November 20, 2019

RedHat Ansible - Code Review Tool - Part 1



RedHat Ansible used for many varied dimensions of automation is being adopted and stands to be one of the prominent choices both in Cloud and/or On-prem Automation platforms

What if we have some automated code review tool which would review the basic linting as per the rules defined in config files?

What if we can do Continous Integration - unit testing for every commit of ansible automation using this tool?

Without further ado, let us see what it is..It is ansible-review

ansible-review is a code reviewing tool for reviewing ansible roles, playbooks and suggest improvements as warnings. This enforces coding best practices that are to be followed across teams which helps us meet global vision for every tool developed, which is code compliances for easy maintenance and re-usability

ansible-review is capable of below:
  • integrated with GIT results
  • configurable rules for identification and suggestions

Latest version stands to be 0.13.9 

Pre-requisites:
  • AWS console login and an EC2 instance with linux 
  • Ansible installed in the instance

Getting Started:
  • Login into the AWS account
  • Start the EC2 instance and connect to the same
  • Obviously, we need ansible config setup ready
  • install ansible-review
How to install: 

  • check ansible installed 

  • install ansible-review
 
 
  • check the version for ansible-review


Now we have successfully installed ansible-review. Let us see how to use ansible-review tool for code review using a sample playbook in the upcoming series

No comments:

Post a Comment