Javatpoint Logo
Javatpoint Logo

Ansible Installation in Linux

When you have compared and weighed your options and decided to go for Ansible. Then installed it on your system. Let's go step by step of the installation in different Linux distributions, such as:


  1. PyYAML: a YAML parser and emitter for the python programming language.
  2. Httplib2: a comprehensive HTTP client library.
  3. parmiko: native python SSHv2 protocol library.
  4. Distro: RHEL/ CentOS/ Debian/ Ubuntu Linux.
  5. Jinja2: a modern and designer friendly templating language for python.
  6. sshpass: a non-interactive ssh password authentication.

Install Ansible on RedHat/Centos systems

Step 1: Install the EPEL repo

Step 2: Install the Ansible package.

Install Ansible on Debian/Ubuntu systems

Step 1: First perform an update to the packages

Step 2: Then install the software properties common package.

Step 3: And install the Ansible personal package archive.

Step 4: Install the Ansible.

Install Ansible using pip

The pip command is a tool for installing and managing python packages.

Step 1: This given method works on the Linux and UNIX like systems.

Install the latest version of Ansible

Using Portage (Gentoo)

To install the latest version, you need to unmask the Ansible package prior to emerging:

Using pkg (FreeBSD)

Ansible works with both python 2 and 3 version, FreeBSD has different packages for each python version. To install you can use:


You can also to install from ports:

Using OpenCSW (Solaris)

The Ansible is available for Solaris as SysV package from openCSW:

Using Pacman (Arch Linux)

Ansible is available in the community repository:

Using sbopkg (Slackware Linux)

Ansible build script is available in the repository. Also can be built and installed using sbopkg.

Step 1: Create queue with Ansible and all dependencies.

Step 2: Build and install packages from created queue file.

Using swupd (Clear Linux)

Step 1: Ansible and its dependencies are available as part of the sysadmin host management bundle.

Step 2: And update of the software will be managed by the swupd tool.


By using yum

On Fedora:

On RHEL and CentOS:

By using apt

By using pip

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA