Install Ansible on Mac OSX

Brew Install

If you already have Homebrew installed, then it is as simple as:

> brew install ansible

That's it!

If you prefer to use Python and pip for the install, then read on...

Native Python Install - Summary:

Ansible uses Python and fortunately Python is already installed on modern versions of OSX.

Then, if you would like to update Ansible later, just do:

Native Python Install - Full explanation:

Ensure Xcode is installed first

Some of Ansible's dependencies need to be compiled, so you'll need the developer tools that come with Xcode.

You can check if you already have the developer tools by running this:

> pkgutil

(note: Before OSX Mavericks, the package to check for was "")

If the tools are not installed, you will see this output:

> pkgutil
No receipt for '' found at '/'.

In that case, download and install Xcode from here.

If the tools are installed, you should see output similar to this:

> pkgutil
volume: /
location: /
install-time: 1397415256

Install pip

pip is Python's package manager. It isn't installed on OSX by default, but you can use Python's other package manager easy_install to install it:

> sudo easy_install pip
Searching for pip
Best match: pip 1.4.1
Processing pip-1.4.1.tar.gz
Running pip-1.4.1/ -q bdist_egg --dist-dir /tmp/easy_install-hVr8Pt/pip-1.4.1/egg-dist-tmp-BY70iY
warning: no files found matching '*.html' under directory 'docs'
warning: no previously-included files matching '*.rst' found under directory 'docs/_build'
no previously-included directories found matching 'docs/_build/_sources'
Adding pip 1.4.1 to easy-install.pth file
Installing pip script to /usr/local/bin
Installing pip-2.7 script to /usr/local/bin
Installed /Library/Python/2.7/site-packages/pip-1.4.1-py2.7.egg
Processing dependencies for pip
Finished processing dependencies for pip

Install Ansible

> sudo pip install ansible
...lots of output and warnings you can ignore...
Successfully installed ansible paramiko jinja2 PyYAML pycrypto ecdsa markupsafe
Cleaning up...

Upgrade Ansible

When a new release of Ansible comes out, you can easily upgrade to the new version like this:

> sudo pip install ansible --upgrade

Post-Install Setup

Next, see the post-install steps...

Get the latest updates via email:

Spam-free, one-click unsubscribe