Saturday, October 12, 2013

Install Ansible From Source (Github) on OSX 10.8 (Mountain Lion)

If you want to use Ansible on OSX, I recommend installing it from source; once you know how to do it, you'll always be able to stay on the most up to date version.  We're going to assume you have Git installed.  If you don't, please go install it (http://git-scm.com/).

Here's how you do it.

1.  Install the Pip, a Python package manager.
#
sudo easy_install pip
#
2.  Install the Ansible's Python library dependencies.
#
sudo pip install paramiko PyYAML jinja2
#
3.  Clone the Ansible repository.
#
git clone git://github.com/ansible/ansible.git
#
4.  Move into the ansible directory.
#
cd ansible
#
5.  Make and install.
#
sudo make install
#
6. Verify the install.
#
ansible --version
#

Have fun.

Addendum.

If you plan to use passwords with Ansible, you need to install sshpass. You can do this easily using Macports: http://www.macports.org/.
#
sudo port install sshpass
#

1 comment:

  1. Awesome! Thank you for the instructions. Exactly what I needed.

    ReplyDelete

Note: Only a member of this blog may post a comment.