Install Ansible 2.1 on RHEL/CentOS 7 with PIP

In order to install Ansible using PIP on RHEL 7 / CentOS 7 we will configure the EPEL 7 repository, and install all of the pre-requisite packages to get Ansible up and running.

Enable the EPEL repository

$ sudo yum-config-manager --add-repo=

Download the EPEL GPG key

$ sudo wget -O /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

Install the GPG key

$ sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

Clean the local yum repository data

$ sudo yum clean all

Install the required packages

$ sudo yum install -y python-devel libffi-devel openssl-devel gcc python-pip redhat-rpm-config


Update to the latest version of pip

$ sudo pip install --upgrade pip

Install paramiko

$ sudo pip install paramiko

Install Ansible

$ sudo pip install ansible

Check the version

$ ansible --version
 config file =
 configured module search path = Default w/o overrides

And we are good to go!

Install Ansible 2.1 on RHEL/CentOS 7 with PIP

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.