MYHOSPITALNOW.COM

Find Trusted Doctors & Hospitals

Discover healthcare providers, compare hospitals, and explore treatment options worldwide.

Free Treatment Quotes • Doctor Search • Hospital Comparison

Find Healthcare Options

www.myhospitalnow.com

What is Ansible and How it works? An Overview and Its Use Cases

Ansible logo

What is Ansible?

It is an open-source software provisioning, configuration management, and application-deployment tool.

It is mainly used for the automation of cross-platform computer support tasks. It is fundamentally intended for IT professionals, who use it for configuration management, cloud provisioning, application deployment, intra-service orchestration, updates on workstations and servers, and nearly for anything a systems administrator does on a day-to-day basis. Ansible doesn’t depend on agent software and, most importantly, no additional custom security infrastructure, so this makes it easy to deploy. It uses a straightforward language (YAML, in the form of Ansible Playbooks) that allows people to use it to describe automation jobs.

History

The word “ansible” was coined by Ursula K. Le Guin in his 1966 novel Rocao’s World, and refers to fictional instantaneous communication systems.

Ansible was developed by Michael DeHaan, author of Provisioning Server Application Cobbler, and co-author of the Fedora Unified Network Controller (Func) Framework for Remote Administration.

Ansible, Inc. (Originally AnsibleWorks, Inc.) The company was founded in 2013 by Michael DeHaan, Timothy Gerla and Sad Zioni to support and sponsor Ansible commercially. Red Hat acquired Ansible in October 2015.

Why do we use Ansible?

There are many advantages of Ansible that we use like:

  • Infrastructure Scaling: when you are handling a large number of servers for configuration and want to make sure that configuration is precisely done & fast too.
  • Agentless: There is no requirement for the agent to be installed on the server to work with Ansible. It uses ssh and python to establish connections with the server.
  • Modular: It uses modules for configuration management, and there are more than 750 built-in modules available, making it easy to handle configure management.
  • Performance: It has very little latency that enhances the performance.
  • Low Overheads: There is no requirement of agents and tools that leads to saving a lot of space and low overhead in terms of deployment.
  • Simple: as it uses Yaml, which is an English-like language & easily understandable.

Features

Ansible uses no extra functionality and cost like no agents and no extra custom security infrastructure, hence it is easy to deploy.
Ansible uses a very simple language called YAML (Yet Another Markup Language) in the form of Ansible Playbooks and you can configure it as per your requirement, and it helps describe the automation jobs in a way that looks like basic English.
The Ansible Automation Engine has a direct interaction with the users who write playbooks and also interacts with cloud services and the Configuration Management Database (CMDB).

Founder of Company.

Michael DeHaan

Ansible components

  • Inventory: The “inventory” is a configuration file where you define the host information. In the above /etc/ansible/hosts example, we declared two servers under test-hosts.
  • Playbooks: In most cases – especially in enterprise environments – you should use Ansible playbooks. A playbook is where you define how to apply policies, declare configurations, orchestrate steps and launch tasks either synchronously or asynchronously on your servers. Each playbook is composed of one or more “plays”. Playbooks are normally maintained and managed in a version control system like Git. They are expressed in YAML (Yet Another Markup Language).
  • Plays: Playbooks contain plays. Plays are essentially groups of tasks that are performed on defined hosts to enforce your defined functions. Each play must specify a host or group of hosts. For example:

– hosts: all

  • Tasks: Tasks are actions carried out by playbooks. One example of a task in an Apache playbook is:

– name: Install Apache httpd

  • Roles: A role is the Ansible way of bundling automation content and making it reusable. Roles are organizational components that can be assigned to a set of hosts to organize tasks. Therefore, instead of creating a monolithic playbook, we can create multiple roles, with each role assigned to complete a unit of work. For example: a webserver role can be defined to install Apache servers.
  • Handlers: Handlers are similar to tasks except that a handler will be executed only when it is called by an event. For example, a handler that will start the httpd service after a task installed httpd. The handler is called by the [notify] directive. Important: the name of the notify directive and the handler must be the same.
  • Templates: Templates files are based on Python’s Jinja2 template engine and have a .j2 extension. You can, if you need, place contents of your index.html file into a template file. But the real power of these files comes when you use variables. You can use Ansible’s [facts] and even call custom variables in these template files
Ansible management node using playbook and inventory to reach grouped hosts over SSH

Advantages of Ansible

  • Easy-to-Learn: The simplicity is not only meant for professionals but also for beginners. It is easy to learn, and so, users could learn to use Ansible quickly along with better productivity. Ansible receives the support of comprehensive and easily interpretable documentation.
  • Written in Python: The next important addition among the benefits of Ansible. Ansible manages all the master-agent communications through Standard SSH or Paramiko module. The Paramiko module is a Python implementation of SSH2 and is crucial for managing nodes. Therefore, Ansible does not require any form of agents installed on remote systems for ensuring management. As a result, maintenance overheads and performance degradations reduce considerably by huge margins with Ansible.
  • Not dependent on agent: The most important advantage of Ansible refers to its agentless nature. Ansible manages all master-agent communication via standard SSH or Paramiko modules. The Paramiko module is a Python implementation of SSH2 and is important for managing nodes. Therefore, Ansible does not require any form of agents installed on the remote system to ensure management. As a result, maintenance overheads and performance degradation are significantly reduced with Ansible by a large margin.
  • YAML-Based Playbooks: Ansible Configuration Files—are written in YAML, which is better suited for configuration management and automation purposes than other formats like JSON. It’s easy to read, supports comments, and uses anchors to reference other objects.
  • Ansible Galaxy: Ansible Galaxy is a portal that acts as the central repository for locating, reusing, and sharing Ansible-related content. The best advantage of Ansible Galaxy is in the example of downloading reusable Roles for installing application or server configuration.

Alternatives of Ansible

  • Rudder.
  • SaltStack.
  • Puppet Enterprise.
  • Chef.
  • CFEngine.
  • Gitlab CI.
  • Jenkins.

Interview Questions and Answers

Best Tutorials and Guide for Ansible

Best Courses and Insitute for learning

If you want certification course for such top course. So please visit “Devopsschool.com”. You will find more certification courses here.

DevOpsSchool logo with tagline Lets Learn, Share & Practice DevOps


Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
I'm Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms. I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.

Related Posts

How Ansible Automates Cisco IOS and IOS XE Network Devices

Introduction Managing multiple Cisco routers and switches manually can become time-consuming as a network grows. Network engineers regularly configure interfaces, check device status, update settings, and troubleshoot…

Read More

Configuration Management in DevOps: Concepts, Tooling, and a Practical Workflow

This guide explains how configuration management works in modern DevOps teams, compares common tools, and shows a practical Ansible example. It also preserves the original SlideShare reference from the legacy post.

Read More

Configuration Management in DevOps: Workflow, Tool Comparison, and an Ansible Example

This guide explains configuration management for DevOps teams: what it solves, how it fits into delivery workflows, and how major tool options compare. It also includes a practical Ansible example you can adapt for real environments.

Read More

Infrastructure as Code: A Practical Guide for DevOps Professionals

Introduction Managing infrastructure has undergone a massive transformation over the past decade. If you started your career in the era of physical data centers, you likely remember…

Read More

Staff Network Automation Engineer: Role Blueprint, Responsibilities, Skills, KPIs, and Career Path

The Staff Network Automation Engineer is a senior individual contributor in the Cloud & Infrastructure organization responsible for designing, building, and scaling automation systems that make network provisioning, configuration, validation, and operations reliable, fast, and repeatable. The role blends deep networking fundamentals with software engineering practices (version control, CI/CD, testing, observability) to deliver “network as code” capabilities across data center, cloud, and edge environments.

Read More

Top 10 Configuration Management Tools: Features, Pros, Cons & Comparison

Introduction Configuration Management Tools are a core pillar of modern IT operations and DevOps practices. At their foundation, these tools help organizations define, enforce, and maintain consistent…

Read More
Subscribe
Notify of
guest
1 Comment
Newest
Oldest Most Voted
Joyce Karr
Joyce Karr
3 years ago

Ursula Le Guin was a she, not a he! And the novel is
Rocannon’s World, which was her first published novel.

1
0
Would love your thoughts, please comment.x
()
x