Slide 1
Most trusted JOB oriented professional program
DevOps Certified Professional (DCP)

Take your first step into the world of DevOps with this course, which will help you to learn about the methodologies and tools used to develop, deploy, and operate high-quality software.

Slide 2
DevOps to DevSecOps – Learn the evolution
DevSecOps Certified Professional (DSOCP)

Learn to automate security into a fast-paced DevOps environment using various open-source tools and scripts.

Slide 2
Get certified in the new tech skill to rule the industry
Site Reliability Engineering (SRE) Certified Professional

A method of measuring and achieving reliability through engineering and operations work – developed by Google to manage services.

Slide 2
Master the art of DevOps
Master in DevOps Engineering (MDE)

Get enrolled for the most advanced and only course in the WORLD which can make you an expert and proficient Architect in DevOps, DevSecOps and Site Reliability Engineering (SRE) principles together.

Slide 2
Gain expertise and certified yourself
Azure DevOps Solutions Expert

Learn about the DevOps services available on Azure and how you can use them to make your workflow more efficient.

Slide 3
Learn and get certified
AWS Certified DevOps Professional

Learn about the DevOps services offered by AWS and how you can use them to make your workflow more efficient.

previous arrow
next arrow

How can we use Ansible and where?

Spread the Knowledge

Friends, First of all let’s know about Ansible is simple yet powerful. It is a great automation tool and does have great future. It is an open-source automation tool, or platform, used for IT tasks such as configuration management, application deployment, intraservice orchestration, and provisioning. It is one of the most easy to use, versatile and light tool for configuration management as well.

Ansible is a tool that provides:

How to Use Ansible?

Below you can see – Ansible consists of 3 main components. A brief explanation of each component is shown below:

Control Machine : It manages the execution of the Playbook. It can be installed on your local machine or on any machine on the internet.
Inventory : It provides a complete list of all the target machines on which various modules are run by doing an ssh connection and install the necessary software.
Playbook : It consists of steps that the control mechanism will perform on the servers defined in the inventory file.

Ansible is a powerful IT automation tool that you can quickly learn. Its simple enough for everyone in IT yet powerful enough to automate even the most complex deployment.

Simple – Use Case Example

Let’s take a look at a simple use case shown in the following image.

Now you can imagine you have a number of servers in your environment that you would like to restart in a particular order. Some of them are web servers and others are database servers. So you would like to power down the webserver first followed by the database servers then powerup the database servers and then webservers. You could write an Ansible playbook to get this done in a minute and simply invoke the Ansible playbook every time you wish to restart your applications.

Complex – Use Case Example

Let’s take a look at a complex use case as shown in the following image:

The main Benefits of Ansible

  • Ansible is fast and performs all functions over SSH and doesn’t require agent installation.
  • You can find Ansible to be a better fit in a larger or more homogeneous infrastructure.
  • It has a collection of modules that can be used to manage various systems as well as cloud infrastructure such as Amazon EC2 and openstack.
  • The main advantage is Ansible can be run from the command line without the use of configuration files for simple tasks, such as making sure a service is running, or to trigger updates or reboots.
  • As long as the box can be ssh’d into and it has python, it can be configured with Ansible.

Roles Directory Structure

Here i let you know about Roles Directory Structure of Ansible, Using Ansible Roles, expect files to be in a certain file structure. The most confusing part of using roles is understanding the file hierarchy. Ansible provides a feature called Ansible Galaxy that helps you play with roles. We already know where our Ansible is on Ubuntu (/etc/ansible). Have you ever seen a directory called roles under /etc/ansible? That directory exists exactly for this reason. You create different roles inside this directory.

The directory will look like this:

You can create a role using ansible-galaxy init command inside /etc/ansible/roles.

If you are planning to learn Ansible then go with below YouTube channel and get free Videos and Tutorials.

Thank you!

Rajesh Kumar
Latest posts by Rajesh Kumar (see all)