ansible-lint
Checks playbooks for practices and behavior that could potentially be improved
What it is and what it does
ansible-lint is a static analysis tool that scans Ansible playbooks and related automation code to identify practices that deviate from community standards or could cause issues in production. It runs as a command-line tool and integrates into CI/CD pipelines, including GitHub Actions. The package depends on ansible-core for Ansible compatibility, yamllint for YAML validation, and several supporting libraries for schema checking, YAML parsing, and file matching.
The tool is maintained as part of the official Ansible project and supports only the last two major versions of Ansible. It's designed for developers, system administrators, and infrastructure teams who want automated feedback on their Ansible code quality before deployment.
Use it for:
- Run in CI/CD pipelines to automatically check playbooks on pull requests before merging.
- Enforce Ansible best practices across a team by catching common mistakes early.
- Validate playbook syntax and structure locally before committing to version control.
- Integrate into GitHub Actions workflows to gate deployments on code quality.
- Audit existing playbooks for compliance with organizational Ansible standards.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
ansible-lint checks Ansible playbooks and roles for practices that could be improved, flagging issues before deployment.
Yes. ansible-lint is actively maintained, has no known vulnerabilities, and low install friction. The GPLv3 copyleft license is a consideration if you're building proprietary software, but it's the standard for Ansible tooling. Install it if you use Ansible and want automated quality checks on your playbooks.
Install
ansible-lint on PyPI
pip
pip install ansible-lintuv
uv add ansible-lintpoetry
poetry add ansible-lintInstalling ansible-lint
Before you install
Low install friction with a pure-Python wheel distribution. Active maintenance with a release 2 days old and 3896 repository stars. Requires Python 3.10 or later.
License in practice
Distributed under GPL-3.0-or-later due to copyleft runtime dependencies like ansible-core and yamllint. Own codebase is MIT-licensed, but the effective license for distribution is GPLv3.
Quickstart
pip install ansible-lint
ansible-lint playbook.yml
Requires Python 3.10 or later and ansible-core as a runtime dependency.
Verify before relying
- Whether the package supports linting Ansible roles in addition to playbooks.
- What specific rule categories or checks are included in version 26.8.0.
- Whether custom rules or rule configuration is supported.
Package facts
| License | GPL-3.0-or-later (copyleft) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 17 — ansible-compat, ansible-core, black, cffi, cryptography, distro, filelock, jsonschema, packaging, pathspec, pyyaml, referencing, ruamel-yaml, ruamel-yaml-clib, subprocess-tee, wcmatch, yamllint |
| Maintenance | actively maintained — 2 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 5,340,142/month — #2,116 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: ansible_lint-26.8.0-py3-none-any.whl
Keywords: ansible, lint
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
ansible-compatProvides compatibility utilities for working…
permissive · top 5,000 on PyPI
araARA Records Ansible records and reports on…
unclear · top 15,000 on PyPI
salt-lintsalt-lint checks Salt State files (SLS) for…
permissive · top 15,000 on PyPI
ansible-dev-toolsBundles and installs a curated suite of Ansible…
copyleft · top 15,000 on PyPI
ansible-navigatoransible-navigator is a text-based user…
permissive · top 15,000 on PyPI
ansible-coreAnsible Core is the engine for agentless IT…
copyleft · top 5,000 on PyPI
moleculeMolecule is an Ansible testing framework for…
permissive · top 5,000 on PyPI
commitlintLints commit messages against the Conventional…
copyleft · top 15,000 on PyPI
ansibleAnsible is an IT automation system that handles…
copyleft · top 5,000 on PyPI
ansible-runnerAnsible Runner provides a Python library and…
permissive · top 5,000 on PyPI