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.

Watch on YouTube · Read the written article

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.

Watch Video

Watch "How to install ansible-lint in macOS" on YouTube

What You'll Learn

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

Read the full written article: How to install ansible-lint in macOS

Topics Covered

Related Video Tutorials