Using Github Action to Lint Ansible
Discover how to automate Ansible playbook linting using GitHub Actions, helping you maintain code standards by running ansible-lint on every push. Learn to create and configure workflows that integrate lint checks seamlessly into your CI CD pipeline.
We'll cover the following...
Remembering to run ansible-lint before you push code won’t happen. That’s why you have the computer do it for you, which means using a Github action to lint your playbooks every time you push code.
Github actions automate, customize, and execute software development work from right in our repository. You can create actions yourself, or you can leverage open-source actions created by others.
Github workflows are how you link actions together into a series of tasks. Both actions and workflows are defined by YAML files and stored in the .github directory within your repository.
Create a lint workflow
Ansible (the company) has an open-source action called Ansible Lint for GitHub Action that you will use within a workflow to lint all your Ansible ...