Ansible Lint is a command-line tool for linting playbooks, roles and collections aimed towards any Ansible users. Its main goal is to promote proven practices, patterns and behaviors while avoiding common pitfalls that can easily lead to bugs or make code harder to maintain. Ansible lint is also supposed to help users upgrade their code to work with newer versions of Ansible. Due to this reason we recommend using it with the newest version of Ansible, even if the version used in production may be older. As any other linter, it is opinionated. Still, its rules are the result of community contributions and they can always be disabled based individually or by category by each user. ansible-lint checks playbooks for practices and behavior that could potentially be improved. As a community-backed project ansible-lint supports only the last two major versions of Ansible.

Features

  • The tool produces output on both stdout and stderr
  • As part of the execution, the linter will likely need to create a cache of installed or mocked roles, collections and modules
  • In order to ease tool adoption, git users can enable the progressive mode using --progressive option
  • We recommend following the collection structure layout
  • When you call ansible-lint without arguments the tool will use its internal heuristics to determine file types
  • A JSON report, based on codeclimate specification, can be generated with ansible-lint

Project Samples

Project Activity

See All Activity >

License

GNU General Public License version 3.0 (GPLv3)

Follow Ansible-lint

Ansible-lint Web Site

You Might Also Like
Gen AI apps are built with MongoDB Atlas Icon
Gen AI apps are built with MongoDB Atlas

The database for AI-powered applications.

MongoDB Atlas is the developer-friendly database used to build, scale, and run gen AI and LLM-powered apps—without needing a separate vector database. Atlas offers built-in vector search, global availability across 115+ regions, and flexible document modeling. Start building AI apps faster, all in one place.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Ansible-lint!

Additional Project Details

Programming Language

Python

Related Categories

Python Software Development Software, Python Education Software, Python Command Line Tools, Python Linters

Registered

2022-03-10