Author: Sahil Suri

Ansible: overview and installation

Introduction Ansible is an automation platform that consists of an automation language which is YAML, that can describe an IT application infrastructure in the form of Ansible playbooks. Along with the YAML automation language, Ansible provides an automation engine is responsible for running these playbooks. The core Ansible tool is a command line tool and is freely available. It has been written by Michael DeHaan in the Python programming language and was initially released in the year 2012. Michael DeHaan has also written the server provisioning application cobbler. Ansible is owned by RedHat and a paid alternative named Ansible Tower is also available for customers who want an enterprise framework for controlling, securing and managing their Ansible automation with a UI and a RESTful API. In this article, we will go through the various advantages of Ansible and will also show you how to install Ansible.   Why use Ansible? In this section, we will explore the advantages of using Ansible in depth. Ansible is Simple It provides humanly readable automation in the form of playbooks written in YAML. YAML is extremely simple and easy to understand and no special coding skills are required to use Ansible. The tasks defined in playbooks are executed in order further adding to the simplicity of the structure. Since there are no coding skills involved in using Ansible, there is no steep learning...

Read More

Ansible playbook for listing packages in Linux

Introduction Having an inventory of installed software available at hand is an important asset management function. Using this information, we can determine what software is installed on the system, what software needs to be patched or updated and what software needs to be removed. By making use of the yum module available with Ansible we could easily extract this information about our inventory and store it appropriately for future use. In this article, we will share an Ansible playbook that will consist of three tasks. The first task will list all packages currently installed on the system. The second task will list the installed and available versions of a single software package. The third tasks will display the installed and available versions of more than one package. Given below is the Ansible playbook: --- - name: Demonstrate yum list hosts: all gather_facts: no become: yes become_method: sudo tasks: - name: list all installed packages yum: list=installed register: out_all - debug: var=out_all - name: list only one package yum: list=git register: out_one - debug: var=out_one - name: list some packages yum: list={{ item }} with_items: - git - tar - curl register: out_some - debug: var=out_some   Explanation Under the hosts section, we’ve indicated that we’d like to execute this playbook on all hosts available in the inventory. You may modify it appropriately as per your requirement. To provide a...

Read More

How to install git in Linux without root access ?

Introduction In one of our earlier articles on using the git distributed version control system, we showed you how to install git in Linux. As you may observe from that article, installing git is a fairly straightforward process. But what if you were not a system administrator and did not have sahil privileges on the system you were working on. One alternative could be to build the git package from the source code but that would still require access to a compiler like gcc which you may not have. In this article, we will share a very simple method to install the git version control system on your machine requiring only access to the rpm package for git.   Step 1: Create a folder named git The first step is to create a folder named git where you would like to store git related binaries. [sahil@linuxnix:~] $ mkdir git   Step 2: Copy the git rpm to the git folder The next step is to copy the git rpm to the folder named git that we created in the previous step. [sahil@linuxnix:~] $ mv git-1.8.3.1-12.el7_4.x86_64.rpm git [sahil@linuxnix:~] $ cd git [sahil@linuxnix:~/git] $ ls -ltr total 4516 -rw-r--r-- 1 sahil sahil 4600452 Aug 16 08:59 git-1.8.3.1-12.el7_4.x86_64.rpm   Step 3: Extract the git rpm contents Now we will extract the contents of the git rpm into the current working directory i.e...

Read More

Over 16,000 readers, Get fresh content from “The Linux juggernaut”

Email Subscribe

ABOUT ME..!

My photo
My name is Surendra Kumar Anne. I hail from Vijayawada which is cultural capital of south Indian state of Andhra Pradesh. I am a Linux evangelist who believes in Hard work, A down to earth person, Likes to share knowledge with others, Loves dogs, Likes photography. At present I work at Bank of America as Sr. Analyst Systems and Administration. You can contact me at surendra (@) linuxnix dot com.