在生产环境中使用 ansible-lint 对 Ansible playbooks 和 roles 进行 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
Source: https://github.com/1991513ccie-png/skills
Extracted from upstream docs: https://raw.githubusercontent.com/ansible/ansible-lint/HEAD/README.md
Documentation
- https://ansible.readthedocs.io/projects/lint/




