Introduction to Ansible and How Industries are solving their challenges and Usecases using Ansible:

Rajneesh pratap singh
6 min readDec 29, 2020

--

What is Ansible?

Ansible is an open-source automation tool, or platform, used for IT tasks such as configuration management, application deployment, intra service orchestration, and provisioning. Automation is crucial these days, with IT environments that are too complex and often need to scale too quickly for system administrators and developers to keep up if they had to do everything manually.

History of Ansible

The term “ansible” was coined by Ursula K. Le Guin in her 1966 novel Rocannon’s World, and refers to fictional instantaneous communication systems.
The Ansible tool was developed by Michael DeHaan, the author of the provisioning server application Cobbler and co-author of the Fedora Unified Network Controller (Func) framework for remote administration.
Ansible, Inc. (originally AnsibleWorks, Inc.) was the company set up to commercially support and sponsor Ansible.Red Hat acquired Ansible in October 2015.

Why Ansible?

Ansible is an Agentless tool that means we don’t need to install it on the managed node just installed on the controller node and start working with ansible. Ansible is a very intelligent tool and its intelligence comes from modules. As an IT Admin, we don’t have to remember all OS commands just tell which package you wanna install and ansible will do that thing for you!

What is the playbook file?

Playbooks are the files where the Ansible code is written. Playbooks are written in YAML format. YAML stands for Yet Another Markup Language. Playbooks are one of the core features of Ansible and tell Ansible what to execute. They are like a to-do list for Ansible that contains a list of tasks.

Playbooks contain the steps which the user wants to execute on a particular machine. Playbooks are run sequentially. Playbooks are the building blocks for all the use cases of Ansible.

Important Terms in Ansible

These are the few important terms using in Ansible —

  • Controller Node: This is where Ansible gets installed. The controller machine helps in enabling provisioning on servers we manage.
  • Managed Node: This is nodes where the task is executed by the controller node.
  • Inventory: This is basically an initializing file that contains information about the servers that we are managing.
  • Modules: These are little programs that act as building blocks encapsulating common tasks such as using yum to install packages or ping to test the connection to a remote host.
  • Playbook: It is an organized unit of scripts defining an automated work for the configuration management of our server.
  • Task: A task block defines a single procedure to be executed on the server like installing packages.

Ansible Workflow

  1. As the services increase, sysadmins will provision more servers to do configuration management. They need to install Ansible on the master node where they need to write the code into the Ansible playbook to describe the setup, installation process, and the configuration required for these servers.
  2. The local machine connects to these servers (nodes) through an inventory using secured SSH connections.
  3. Once these nodes are connected to the master server, then the node servers are analyzed and the playbook codes are pushed toward each of the servers so that these playbooks can configure the servers remotely, which leads to a consistent environment.

Benefits of Using Ansible

  • Agentless: As long as a connection can be SSHed and it has Python, it can be configured with Ansible; no agent/software or additional firewall ports are required to install on our client or host systems for automation. Also, we don’t have to worry about setting up and managing the infrastructure.
  • Simple: As we’ve seen, Ansible uses a very simple syntax written in YAML known as playbooks — YAML (Yet Another Markup Language) is a human-readable data serialization language. We don’t need special coding skills to code and understand playbooks. It is very easy to install and execute tasks in order.
  • Modular: Ansible is modular as we require only one program per script. This way, we can spread our programs across different servers.
  • Efficient: Not requiring any extra software on our servers means that there is more space for our resources.
  • Powerful and flexible: Having powerful features gives us the capability to model even complex IT workflows in lesser time, along with managing infrastructure, networks, operating systems, and services that are already in use.

PROVISIONING

Your apps have to live somewhere. If you’re PXE booting and kickstarting bare-metal servers or VMs, or creating virtual or cloud instances from templates, Ansible and Red Hat® Ansible® Tower help streamline the process.

CONFIGURATION MANAGEMENT

Centralizing configuration file management and deployment is a common use case for Ansible, and it’s how many power users are first introduced to the Ansible automation platform.

APPLICATION DEPLOYMENT

When you define your application with Ansible, and manage the deployment with Ansible Tower, teams are able to effectively manage the entire application lifecycle from development to production.

CONTINUOUS DELIVERY

Creating a CI/CD pipeline requires buy-in from numerous teams. You can’t do it without a simple automation platform that everyone in your organization can use. Ansible Playbooks keep your applications properly deployed (and managed) throughout their entire lifecycle.

SECURITY AUTOMATION

When you define your security policy in Ansible, scanning and remediation of site-wide security policy can be integrated into other automated processes and instead of being an afterthought, it’ll be integral in everything that is deployed.

ORCHESTRATION

Configurations alone don’t define your environment. You need to define how multiple configurations interact and ensure the disparate pieces can be managed as a whole. Out of complexity and chaos, Ansible brings order.

now let’s have a look on how CISCO is using ansible:

CISCO ENABLES DEVOPS

As customers embrace the DevOps model to accelerate application deployment and achieve higher efficiency in operating their data centers, the infrastructure needs to change and respond faster than ever to business needs. These changes can help you achieve an agile operational model by improving on automation, innovation, and consistency.

The Cisco Nexus platform allows you to easily:

  • Integrate your applications into your customer’s existing DevOps tools chain
  • Improve flexibility in installing and deploying whatever protocol package or custom applications you need on the switch
  • Get open and full access to switch resources and data

Integrated Solution

The feature richness in Cisco Nexus NX-OS combined with the scaling and performance capabilities enable customers to build efficient data centers.

The Ansible integration with Cisco Nexus platforms enables customers to take advantage of programming and automating the infrastructure at scale with speed.

Ansible accelerates Day 0, 1 and 2 operations in the following ways:

  • Day 0 — Automates device bring up
  • Day 1 — Push network configurations to maintain consistency across the infrastructure
  • Day 2 — Optimizes network compliance and operation

Solution Benefits

The combined Ansible and Cisco solution provides:

  • Speed IT Transformation
  • Leverage Open Ecosystem
  • Efficient Operational Model
  • Faster Adoption
  • Improve Speed and Agility

thank you #happy_learning

ping here for more information about ansible !

--

--

No responses yet