Ansible is a general purpose IT automation platform, has rapidly become one of the most popular IT automation tools in the world. Like puppet, Chef, but way more easier to get started and master it.

Here is the first step of using it, installing Ansible.

Ansible is also available on Windows and Mac, but more popular on Linux. I'll show you how to install ansible on Linux, if you are interested  to install Ansible on other platform, check Ansible Document  for more info.


Installing Ansible on Linux

Ansible's only real dependency is python. Once Python is installed, the simplest way to get Ansible running is to use pip, a simple package manager for Python.

On Linux, chances are you already have Ansible's dependencies installed, but we'll cover the most common installation methods.

If you have python-pip and python-devel installed, use pip to install Ansible, so you have gcc, make, etc. available)

$sudo pip install ansible

Using pip allows you to upgrade Ansible with pip install --upgrade ansible.

On Fedora/RHEL/CentOS:

The easiest way to install Ansible on a RHEL like system is to use the offcial yum package. Install EPEL, then run command:

$yum -y install ansible

Note: python-pip and ansible are available via the EPEL repository. If EPEL is not installed on you server, install EPEL with the following commands:


$rpm -ivh


$yum install epel-release

On Debian/Ubuntu:

The easiest way to install Ansible on a debian or Ubuntu system is to use the official apt package.

$sudo apt-add-repository -y ppa:ansible/ansible
$sudo apt-get update
$sudo apt-get install -y ansible

Note: If you get an error like "sudo: add-apt-repository: comand not found"', you are probably missing the python-software-properties  package. Install it with the command:

$sudo apt-get install python-software-properties

Once Ansible is installed, make sure it's working properly by entering ansible -version on the command line. Like

# ansible --version
ansible 1.9.2
  configured module search path = None



Comments powered by CComment