Lint Ansible playbooks and roles before automation breaks in prod with ansible-lint
Run ansible-lint against playbooks, roles, and collections so risky patterns and common mistakes are caught before automation is merged or executed.
Prerequisites
Python, Ansible, ansible-lint
Installation
Requirements and caveats from upstream:
- setup_python: If python should be installed. Default is true.
- python_version: The version of python to install. Default is 3.14.
Basic usage or getting-started notes:
This action allows you to run ansible-lint on your codebase without having to
yaml
.github/workflows/ansible-lint.yml
Extracted from upstream docs: https://raw.githubusercontent.com/ansible/ansible-lint/HEAD/README.md