AnsiblePilot — Master Ansible Automation
AnsiblePilot is the leading resource for learning Ansible automation, DevOps, and infrastructure as code. Browse over 1,400 tutorials covering Ansible modules, playbooks, roles, collections, and real-world examples. Whether you are a beginner or an experienced engineer, our step-by-step guides help you automate Linux, Windows, cloud, containers, and network infrastructure.
Popular Topics
About Luca Berton
Luca Berton is an Ansible automation expert, author of 8 Ansible books published by Apress and Leanpub including "Ansible for VMware by Examples" and "Ansible for Kubernetes by Example", and creator of the Ansible Pilot YouTube channel. He shares practical automation knowledge through tutorials, books, and video courses to help IT professionals and DevOps engineers master infrastructure automation.
How to install ansible-lint in macOS — Video Tutorial
How to install the ansible-lint command line utility and use it to improve our Ansible Playbooks in macOS Intel and Silicon.
What You'll Learn
- What is the ansible-lint tool?
- Links
- Installation in macOS
- before
- installation command
- execution
- verification
- Conclusion
- Related Articles
- Configuration
Full Tutorial Content
What is the ansible-lint tool?
> ansible-lint checks playbooks for practices and behavior that could potentially be improved.
[Ansible-Lint](/articles/ansible-lint) is a command-line tool for linting playbooks, roles, and collections aimed toward 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.
Links
- ansible-lint https://ansible-lint.readthedocs.io/
- Homebrew https://brew.sh/
Installation in macOS
Let's install the `ansible-lint` tool in macOS using the Homebrew package manager. I suppose the Homebrew is already installed using the Homebrew https://brew.sh/ website. The brew tool works on macOS Intel and Silicon (M1, M2, M1Pro, M2Pro, M1Max, M2Max, M1Ultra, M2Ultra).
before
```bash
% ansible-lint
zsh: command not found: ansible-lint
% brew search ansible-lint
==> Formulae
ansible-lint ansible ✔
==> Casks
ansible-dk
```
installation command
The installation command downloads the required files and dependencies (sqlite, ansible, black, pygments and yamllint) and install them in our system.
```bash
% brew install ansible-lint
```
execution
```bash
% brew install ansible-lint
==> Fetching dependencies for ansible-lint: sqlite, ansible, black, pygments and yamllint
==> Fetching sqlite
==> Downloading https://ghcr.io/v2/homebrew/core/sqlite/manifests/3.41.0
Already downloaded: /Users/lberton/Library/Caches/Homebrew/downloads/19202efbc509ad22113d571d4b2aaa86fdbf2e3c5299fde49c6a0bb41d9b0328--sqlite-3.41.0.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/sqlite/blobs/sha256:72073c161c9ee425437a
Already downloaded: /Users/lberton/Library/Caches/Homebrew/downloads/c1511ff7e302362a8736c0964fb633597bee677c78599790eb905eb3e5ff27f4--sqlite--3.41.0.arm64_ventura.bottle.tar.gz
==> Fetching ansible
==> Downloading https://ghcr.io/v2/homebrew/core/ansible/manifests/7.3.0
Already downloaded: /Users/lberton/Library/Caches/Homebrew/downloads/8abde3dff30d5f40dee39f30248a558f50232653b325325b924a206bf6cfb3ad--ansible-7.3.0.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/ansible/blobs/sha256:11869f8ad5ad1d3ba34
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:1186
100.0%
==> Fetching black
==> Downloading https://ghcr.io/v2/homebrew/core/black/manifests/23.1.0
100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/black/blobs/sha256:ae6062bf90830375e496d
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:ae60
100.0%
==> Fetching pygments
==> Downloading https://ghcr.io/v2/homebrew/core/pygments/manifests/2.14.0
100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/pygments/blobs/sha256:d4b2214521e36150b2
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:d4b2
100.0%
==> Fetching yamllint
==> Downloading https://ghcr.io/v2/homebrew/core/yamllint
About This Tutorial
- Author: Luca Berton
- Difficulty: Beginner
- Read time: 4 min
- Category: installation
Read the full written article: How to install ansible-lint in macOS
Related Video Tutorials
- Installing JetPorch via Packages on macOS — A Step-by-Step Guide to Installing JetPorch via Packages on macOS. Practical examples and step-by-step guidance on Installing JetPorch via Packages on macOS.
- Event-Driven Ansible: Automate IT Operations Efficiently — Explore how Event-Driven Ansible automates repetitive tasks, improves IT operations, and boosts productivity.
- Ansible Private Automation Hub: Centralize and Secure Automation — Learn how Ansible Private Automation Hub enhances IT automation by centralizing content, improving security, and facilitating collaboration across teams.
- Ansible Automation Platform on ARM: Enhance Scalability & Efficiency — Discover how Ansible Automation Platform supports ARM processors, offering flexibility, seamless integration, and increased automation efficiency.
- Containerized Ansible Automation Platform: A New Era in IT Automation — Discover the streamlined installation, enhanced portability, and new features of the containerized Ansible Automation Platform.
- Ansible Core 2.14.2 & Community 7.2.0: Latest Updates — Discover the latest updates for Ansible Core 2.14.2 and Community 7.2.0. Learn about new features, installation tips, and how these releases impact your.