Hello and welcome to this guide.
Recently i got to configure Ansible on a Linux server running RedHat Enterprise Linux 7 and its completely disabled from the internet.
I will assume you already know what Ansible is and that you are just trying to figure out, how to configure it on a completely disconnected linux machine.
Pre-Requisites To Install Ansible On RHEL 7:
Of course there are dependencies necessary to install Ansible and below are them.
Pre-Requisite Installation Commands:
cd into the folder with the dependencies and….
yum localinstall -y python-crypto-2.6.1-1.el7.rf.x86_64.rpm
yum localinstall -y python-httplib2-0.9.2-0.2.el7.noarch.rpm
yum localinstall -y python-keyczar-0.71c-2.el7.noarch.rpm
yum localinstall -y python2-jmespath-0.9.4-2.el7.noarch.rpm
yum localinstall -y python-babel-0.9.5-1.el5.rf.noarch.rpm
Ansible Installation Procedure:
- Download Ansible from this URL (https://www.rpmfind.net/linux/rpm2html/search.php?query=ansible ) and copy this rpm to the installation_media catalog/directory on target machine.
- Use mentioned command to install ansible. i.e. Yum localinstall /installation_media/ansible*
- When above command completed, you can verify that ansible is installed successfully by using command i.e. ansible –version
Ansible Hierarchy:
It’s time to explain the ansible file/folder hierarchy. You will notice that if you list files or folders in /etc/ansible, you will see the following. In addition, I have provided a description of each file or folder.
- /etc/ansible — The ansible home folder where everything resides
- /etc/ansible/hosts — This file contains information of hosts. You can mention host name their IP’s or mention them in the form of groups.
- /etc/ansible/ansible.cfg — This is the main configuration file for Ansible
- /etc/ansible/roles — This folder allows you to create folders for each server role, web/db/app, etc.
A rich documentation availability and regular updates of Ansible on it’s website makes it a very strong competitor of Puppet and Chef like automation tools. Please write us in the comment section if you have any queries or question regarding this post.