Skip to main content
๐Ÿ“ฌ Get weekly Production AI insights Practical notes on Kubernetes, AI infrastructure and platform engineering. No spam. Subscribe free
How to Install Ansible on macOS
Automation

How to Install Ansible on macOS

Step-by-step guide to install Ansible on macOS. Covers package installation, pip install, version management, and first playbook setup.

LB
Luca Berton
ยท 1 min read

Here is how to install Ansible on macOS in 2026.

Install with Homebrew

brew install ansible

Verify

ansible --version
ansible-playbook --version
ansible-galaxy --version

Alternative: pipx

brew install pipx
pipx ensurepath
pipx install --include-deps ansible

Alternative: pip in Virtual Environment

python3 -m venv ~/ansible-venv
source ~/ansible-venv/bin/activate
pip install ansible

Post-Installation

mkdir -p ~/.ansible
ansible localhost -m ping
ansible-galaxy collection install community.general ansible.posix

Upgrade

brew upgrade ansible

Free 30-min Production AI consultation

Book Now