skillfed

ansible-lint

Checks playbooks for practices and behavior that could potentially be improved

ansible-lint v26.8.0 5.3M downloads/30d#2,116 on PyPI3,896
Copyleft license GPL-3.0-or-later Active released

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-lint

uv

uv add ansible-lint

poetry

poetry add ansible-lint

Installing 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

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: Information TechnologyIntended Audience :: System AdministratorsOperating System :: MacOSOperating System :: POSIXProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Quality AssuranceTopic :: Software Development :: TestingTopic :: System :: Systems AdministrationTopic :: Utilities

Tags

ansible playbook linteransible best practices checkerlint ansible codeansible quality assuranceansible static analysisplaybook validation toolansible code review automation
ansibleci-cdlinting

More Utilities packages