Skip to content
Chris Cuming edited this page Oct 11, 2015 · 1 revision

NOTE: This is taken from the Ansible source installation documentation and tested on Ubuntu 14.04. Refer back to the documentation if you run into issues.

Clone Ansible

$ git clone git://github.com/ansible/ansible.git --recursive
$ cd ./ansible
$ source ./hacking/env-setup -q # It's a good idea to add this to your ~/.bashrc.

Install pip and Python Modules

$ sudo easy_install pip
$ sudo pip install paramiko PyYAML Jinja2 httplib2 six docker-py

Configure Local Ansible Hosts File

$ export ANSIBLE_INVENTORY=~/ansible_hosts # Another good thing to keep in your ~/.bashrc.

Ansible Hosts Template

Make sure your hosts are listed properly in ~/ansible_hosts. Take a look at the excellent Ansible inventory file documentation for details.

Updating Ansible

$ cd ~/path/to/your/checkout/ansible/
$ git pull --rebase
$ git submodule update --init --recursive

Testing the Installation

NOTE: Assumes a correct entry for your_remote_host in the local ansible_hosts file. Also assumes that the local user's SSH key is authorized on your_remote_host.

$ ansible your_remote_host -m ping

Expected Result:

your_remote_host | SUCCESS => { "changed": false, "ping": "pong" }