Skip to main content

Ansible Installation Steps Red Hat Enterprise Linux 7

Ansible is a simple IT automation engine that automates provisioning, configuration management, application deployment and many other IT needs. Designed for multi-tier deployments, ansible models your IT infrastructure by describing how all of your systems interrelate, rather than just managing one system at a time. In this Article we are going to learn Ansible Installation Steps Red Hat Enterprise Linux 7 – RHEL 7.
It uses no agents and no additional custom security infrastructure, so it’s easy to deploy – and most importantly, it uses a very simple language YAML that allow you to describe your automation jobs in a way that approaches plain English.

Ansible Architecture

Ansible works by connecting to your nodes and pushing out small programs, called “Ansible modules” to them. These programs are written to be resource models of the desired state of the system. Ansible then executes these modules using SSH Protocol, and removes them when finished.
Your library of modules can reside on any machine, and there are no servers, daemons, or databases required. Typically you will work with your favorite terminal program, a text editor, and probably a version control system to keep track of changes to your content.

Ansible Installation RHEL 7

To Install Ansible, we have to configure EPEL Repository then install using this extra repository
# wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-10.noarch.rpm
# rpm -ivh epel-release-7-10.noarch.rpm
If your directly trying to install using yum command it will end up with below error
Required: python-jinja2
Requires: PyYAML
Require: python-pyasn1
Why above error is occurring i already configured EPEL repository it contains most of the required RPM’s (typically Python). But recently Red Hat is moved python-jinja2 and PyYAML packages are part of Optional Server repository. To install these you have to subscribe to RHEL. Alternative is download them manually and install.
# yum install python-dev python-pip
# yum install gcc gcc+
Install above packages and verify pip version, Pip version must be 9 or above, if not try upgrade as shown below
[root@ArkIT-Serv ~]# pip --version
pip8.1.2 from /usr/lib/python2.7/site-packages (python 2.7)
# pip install --upgrade pip
Dependencies needs to be resolved manually
# yum install python2-crypto python2-paramiko python-htt*
# wget ftp://195.220.108.108/linux/centos/7.3.1611/os/x86_64/Packages/python-jinja2-2.7.2-2.el7.noarch.rpm
# wget ftp://195.220.108.108/linux/centos/7.3.1611/os/x86_64/Packages/python-babel-0.9.6-8.el7.noarch.rpm
# rpm -ivh python-babel-0.9.6-8.el7.noarch.rpm
# wget ftp://195.220.108.108/linux/centos/7.3.1611/os/x86_64/Packages/python-markupsafe-0.11-10.el7.x86_64.rpm
# rpm -ivh python-markupsafe-0.11-10.el7.x86_64.rpm
# rpm -ivh python-jinja2-2.7.2-2.el7.noarch.rpm
# wget ftp://195.220.108.108/linux/centos/7.3.1611/os/x86_64/Packages/libyaml-0.1.4-11.el7_0.i686.rpm
# rpm -ivh libyaml-0.1.4-11.el7_0.i686.rpm --nodeps
Now Try Ansible installation using pip command 
# pip install ansible
Check ansible installed Version
[root@ArkIT-Serv ~]# ansible --version
ansible 2.3.2.0
config file =
configured module search path = Default w/o overrides
python version = 2.7.5 (default, Aug 2 2016, 04:20:16) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] 
That’s it. Ansible Installation Steps RHEL 7 Completed and Installation is successful.

Comments

Popular posts from this blog

Troubleshooting Tomcat using Catalina log

Troubleshooting Tomcat using Catalina log We can get the  catalina  logs in  $CATALINA_HOME/logs Here we'll have a  catalina.out We can see some huge info in that log file. If we want to what exactly happens since the start of tomcat then we need to log that into a new file. By default we have log rotation enabled on this logs. For now let us stop tomcat and nullify the catalina.out file and then start tomcat to have some new info in the catalina.out # service tomcat stop # cd $CATALINA_HOME/logs # :> catalina.out (or) cat /dev/null > catalina.out # ll catalina.out -rw-r----- 1 root root 0 Feb 18 16:19 catalina.out # service tomcat start # ll catalina.out -rw-r----- 1 root root 17341 Feb 18 16:21 catalina.out We can see the log being written after the start of tomcat. Now we can notice the instance giving some information about the starting of tomcat, about the configuration for the startup, path of the servlet instance for which the log is re...

Managing tomcat application

Tomcat is a servlet application which is ready to use after download. There is no need of installing this application. We can directly start or stop it from the bin directory.  So in such case we should go to the bin directory in the CATALINA_HOME or else we need to use the startup script along with its absolute path. And the same is needed to shut it down. We can use the below script to manage the tomcat application and we neither need to go to the CATALINA_HOME nor to use the absolute path. All we need to do is to change the permissions to make it executable and copy that to /sbin and /etc/init.d/ directories. If we copy this into /etc/init.d/ then also we need to mention the absolute path but we can easily memorize it as we know all the startup scripts exists there. But if we copy that into /sbin then there is absolutely no need of mentioning the path of the file. We can use this like below: # tomcat start|stop|restart|status #!/bin/bash # Author : Arjun S...

Red Hat Enterprise Virtualization Manager RHEL 7 – Part 2

I have just published  what is RHEV  is the first article to understand RHEV Better. In order to maintain multiple RHEV-Hosts from central place RHEV-Manager is required. RHEV-M will be used as central place to manage all RHEV-Hosts. In this Article We are going to see HowTo Install RHEV-M Red Hat Enterprise Virtualization Manager RHEL 7. Red Hat Enterprise Virtualization Management (RHEV-M) is a virtual management console built on Red Hat Enterprise Linux (RHEL). It interacts with individual RHEV-Hosts using the Virtual Desktop Server Manager (VDSM). A VDSM agent is running on each of the RHEV-H nodes. RHEV-M allows administrators to manage/control number of data centers and their network, compute and storage resources. In addition RHEV-M provides a central repository for storing virtual machines, disks, images and virtual machine snapshots. Install RHEV-M Hardware Requirements Hard Disk Space Minimum 50GB RAM Minimum 4GB – Max 2TB Dual Core or High Processor 1Gb...