Ansible “loop” option might look like little backward but it will very useful when you want to perform the repetitive tasks. For each section in ansible playbook, we need to provide a meaningful name. For an example, if you want to install multiple packages, you need to create the section for each package. This could […]
DevOps
Ansible – How to Use facts on Playbooks ? Conditional Check
Ansible playbook can make changes to the list of servers in quick time. Ansible’s setup module is able to identify the host’s types, OS distributions, and many other facts. For an example, You got a request from a client to install “Apache” package on all the Linux hosts where you have a mix of “Debian” […]
Ansible – How to Gather facts on Remote Server ?
Ansible – “setup” module is responsible to gather facts of the remote hosts. The system facts are nothing but the system configuration which includes the hostname, IP address, filesystems, OS releases, Users, Network parameters, CPU, memory and many more. This module is automatically included in all the playbooks to gather useful variables which can be used to create […]
Ansible – Using File & Copy Modules in Ad-hoc Mode?
Ansible “Ad-hoc” mode can be used to copy/delete/modify files on the specific host or Group of hosts using ansible modules. File module is used for setting file attributes like permission, ownership and creating the links. “Copy” module is used to copy the files to hosts from Ansible server. These modules are very often used in Ad-hoc […]
Ansible – Running Command on Ad-hoc Mode
Ansible allows administrators to execute on-demand tasks on Ansible managed servers. The ad-hoc commands are the most basic operations that can be performed with Ansible engine. Each ad-hoc command is capable of performing a single operation on host or group of hosts. To perform multiple operations, the administrator should run the series of ad-hoc commands from Ansible […]
Ansible – Command vs Shell vs Raw Modules
Ansible uses modules to complete the task on the remote server. The most commonly used command modules are “command”, “shell”, and “raw”. Each module has its own advantages and disadvantages. In Ad-hoc command mode, unless you specify the module name, it uses “command” module by default. In this article, we will see the functionality of […]
Ansible – How to Setup Inventory for Easy Operations ?
In Ansible, Setting up inventory is one of the most important tasks. Ansible can work with multiple servers at the same time but the challenge is how to classify the servers. While setting up Ansible environment, you need to classify the hosts as much a possible using the ansible inventory. For an example, By looking […]
Ansible – How to Prepare and Setup Client Nodes ?
Ansible doesn’t require an agent to push the changes but it needs few configurations on the client side to access the server and perform the tasks without prompting for username/ password/other authentication. I would recommend using non-root user for Ansible setup but ensure that user is consistent across your environment. Let’s setup the servers for Ansible […]
How to Install Ansible Engine on CentOS / RHEL
Installing the Ansible engine and set up the environment is pretty straightforward. Ansible engine can be installed on the majority of Linux flavors which includes CentOS, RHEL, Ubuntu, and Debian but it doesn’t support Windows, Solaris, and AIX. But there are no restrictions to participate as ansible clients. Ansible uses the SSH protocol to manage the Unix and Linux […]
What is Ansible ? How it Works ? Why do we need to use ?
Why do we need Configuration Management tool? Anyone who works as an operations engineer has witnessed a bunch of issues with manual configuration approach and more repetitive tasks which are time-consuming. How many times key resources left the company and new engineer struggle to understand the environment and start performing the tasks without escalation? Server configuration is a […]









