Search This Blog

Monday, June 25, 2018

Installing Ansible


1. Install RHEL EPEL repository. The EPEL (Extra Packages for Enterprise Linux) repository is a package repository for Red Hat Enterprise Linux (RHEL) or CentOS, maintained by people from Fedora Project community, to provide add-on packages from Fedora, which are not included in the commercially supported Red Hat product line.

# sudo yum -y update
# sudo yum -y install wget
# sudo rpm -Uvh epel-release-6*.rpm

For Redhat 7

# wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
# rpm -ivh epel-release-latest-7.noarch.rpm
# yum install epel-release

2. Install “Development tools” group. The “Development tools” are a yum group, which is a predefined bundle of software that can be installed at once, instead of having to install each application separately. The Development tools will allow you to build and compile software from source code. Tools for building RPMs are also included, as well as source code management tools like Git, SVN, and CVS.

# sudo yum groupinstall -y 'development tools'

3. Install python-pip and python-devel

# sudo yum -y install python-pip python-devel
# sudo pip install --upgrade pip

4. Upgrade setup tools

# sudo pip install setuptools --upgrade

5. Install Ansible via pip

# sudo pip install ansible
  
After the installation has completed successfully, you will be able to run this command to show your Ansible’s version number:

# ansible --version
ansible 2.1.1.0

To upgrade ansible to the latest version available in pip repository:

# sudo pip install ansible --upgrade

Thank you for reading.

Reading another article, visit “https://sites.google.com/site/unixwikis/

For Training, Drop an email to ibhagat@outlook.com