Skip to content

Instantly share code, notes, and snippets.

@dburrows
Last active November 4, 2016 01:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dburrows/315ed56f0308e5984ad8 to your computer and use it in GitHub Desktop.
Save dburrows/315ed56f0308e5984ad8 to your computer and use it in GitHub Desktop.
Reliably installing Ansible on OS X Mavericks
// brew install ansible didn't work properly,
// even tried brew install python but no joy
// so use pip on standard python install
sudo pip install ansible
// if you get errors try this
// from https://github.com/ansible/ansible/issues/7146
When you get to the step 'sudo pip install ansible', do this instead:
sudo su -
export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
pip install ansible
exit
That last line is to just make sure you log out of the root account before you break anything accidentally.
This doesn't appear to be ansible-specific, and instead appears to be caused by the version of clang that Mavericks is using and the default settings in it. So if you encounter a similar problem with a 'pip install' command in the future, this should resolve it.
// for --ask-pass support
// from http://thornelabs.net/2014/02/09/ansible-os-x-mavericks-you-must-install-the-sshpass-program.html
cd ~/Downloads
curl -O -L http://downloads.sourceforge.net/project/sshpass/sshpass/1.05/sshpass-1.05.tar.gz
tar xvzf sshpass-1.05.tar.gz
cd sshpass-1.05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment