Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently moved to using OSX to administrate my linux box, so I'm very new to using linux programs on OSX.

I want to use Vagrant with Ansible to bootstrap my development environment, so I need to install it first.

However I've discovered two ways to install Ansible on OSX:



I have already installed Ansible with the pip method, since I came across that guide first.

What are the pros and cons with both methods? Should I install Ansible using pip or homebrew?

I have found that easy install interferes with homebrew:

Warning: /usr/bin occurs before /usr/local/bin
This means that system-provided programs will be used instead of those
provided by Homebrew. The following tools exist at both paths:

share|improve this question

closed as primarily opinion-based by ceejayoz, cjc, freiheit, Ladadadada, Ward Dec 19 '13 at 5:32

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

Personally, I just installed it straight from the Git repository.… – ceejayoz Dec 18 '13 at 21:09
administer or administrate? - Either Pip or Homebrew work. Just stuck with one. – ewwhite Dec 18 '13 at 22:21

I think you will find it best to install it via pip

from the documentation;

Latest Releases Via Pip

Ansible can be installed via “pip”, the Python package manager. If ‘pip’ isn’t already available in your version of Python, you can get pip by:

$ sudo easy_install pip

Then install Ansible with:

$ sudo pip install ansible

Readers that use virtualenv can also install Ansible under virtualenv, though we’d recommend to not worry about it and just install Ansible globally. Do not use easy_install to install ansible directly.

This will allow you to update easily, as it gets the latest version well before brew does.

share|improve this answer
virtualenv can isolate a separate python with Ansible and all its dependencies into one directory, here called 'MyAnsible'. That guarantees indepencence from the system python and libraries installed there. Once you start working on several python projects you will appreciate this. Here's howto install virtualenv: on Mac: sudo easy_install virtualenv==1.10.1 on RedHat: sudo yum install -y python-virtualenv Here is how to setup ansible with virtualenv: virtualenv MyAnsible MyAnsible/bin/pip install ansible virtualenv --relocatable MyAnsible – bbaassssiiee Jan 29 '14 at 8:28
Fair enough. That quote is just from the official documentation, where they suggest to install globally. – Kevin Jan 31 '14 at 6:23
"brew update && brew upgrade ansible"is breaking ansible right now. we should stick with pip – Alexander Jardim Jun 22 '15 at 12:43

I've never had any trouble with Homebrew. In my opinion, it's the best package manager type tool for Mac OS X out there right now (but perhaps not as complete as MacPorts.)
Here's a useful guide for installing Homebrew on Mac OS X Mavericks.
Then simply run

brew install ansible  
share|improve this answer
I like having this installed system wide using Homebrew b/c it's always available regardless of what virtual environment I have activated. This might not matter if you share site-packages in your virtual environments, but I'd prefer not to do that. – bennylope Apr 17 '14 at 18:49

Not the answer you're looking for? Browse other questions tagged or ask your own question.