John E.

0 %
John E.
Red Teamer
Incidence Responder
SANS GCIH | OSCP
  • Location:
    Inside a Pineapple under the sea.
Batch
Bash
Powershell
html
CSS
Js
PHP
WordPress
  • Linux, Windows
  • Windows Server
  • Linux Server
  • Cloud, Azure, AWS, Oracle

Install Ansible On Redhat Linux 7 System Offline

January 22, 2022

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.

  1. 1. Python-crypto
  2. 2. Python-httplib
  3. 3. Python-keyczar
  4. 4. python2-jmespath
  5. 5. Python-babel  (Optional)

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:

  1. 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.
  2. Use mentioned command to install ansible. i.e. Yum localinstall /installation_media/ansible*
  3. When above command completed, you can verify that ansible is installed successfully by using command i.e. ansible –version
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.

Posted in DeploymentsTags:

Leave a Reply

Discover more from John E.

Subscribe now to keep reading and get access to the full archive.

Continue reading