-->

SkillTect provides result-driven consulting and cloud training for tech companies and IT professionals.

SkillTect Technologies Pvt Ltd

Mohan Estate,
Delhi, India 110044,

Advantages of using Ansible

Introduction

Ansible is an open-source software used for automation, configuration management and application deployment. It was created by Michael DeHaan and bought by Red Hat in 2015. It runs on Unix-like operating systems and is agentless.

ansible

Question: What is agentless?

It means that Ansible will not consume any resources as none of its daemons run when its playbooks are not running. 

Question: But why do we use Ansible? Can you provide a use case?

Let us say you need to install one Python package called “scipy” on 100 different unix nodes. Now, you will not run the command “pip install scipy” on all 100 nodes, right? Not only it is repetitive, but it is time-consuming. Enter Ansible! You can follow the below steps to automate the installation of the Python package on all 100 nodes.

  1. Install and configure Ansible on one of your servers. This node is called the control node.
  2. Ensure you have “ssh connectivity” to all the 100 nodes from the Ansible server. These 100 nodes are called managed nodes.
  3. Have an inventory file that has a list of all the managed nodes separated by a line.
  4. Write the ansible playbook that will install scipy on all these managed nodes.
  5. Run the playbook.

Question: But what are playbooks?

Playbooks are YAML files that deal with instructions for what operations need to be performed on managed nodes to achieve the desired output. Here the output is the installation of scipy python package on the 100 nodes. These playbooks can be very simple to complex depending on the tasks that need to be performed.

You can encrypt the sensitive data; you can do this by using functionality available in Ansible called – Ansible Vault.

Advantages of using Ansible

Below are a few of the advantages of using Ansible

Advantages of using Ansible:

Free | Simple | Flexible | Agentless | Efficient

  • Ansible can run on Unix-like systems only like RHEL, SuSE, CentOS, and macOS and installation of Python (either Python 2.7 or 3.5) is a must. That means the control node has to be a Unix-like system. Managed nodes can be Windows nodes too but the installation of Python is mandatory on managed nodes.
  • You can integrate Ansible with bare metal hosts as well as cloud environments like Amazon Web Services (AWS), Google Cloud Platforms (GCP), Microsoft Azure and many more.
  • Ansible is new to the market and there are many configuration-management software available that can compete with it like Chef, Puppet and CFEngine. But Ansible has an edge over this software and that is, it is agentless.
  • It uses a simple and readable YAML-based syntax for defining tasks, making it human-friendly and allowing for easy collaboration.
  • Ansible provides a declarative approach to configuration management, where users specify the desired state of systems, and Ansible takes care of bringing them to that state.
  • It supports a wide range of modules that can be used to manage various aspects of systems, such as package installation, file management, user management, network configuration, and more.

Conclusion

With Ansible, the possibilities for automation and configuration management are endless. Its simplicity, flexibility, and agentless nature make it a standout choice for organizations seeking to optimize their IT operations. By creating playbooks that define the desired state of infrastructure, Ansible empowers users to automate tasks and achieve consistent results across multiple nodes. The seamless integration with various platforms, including cloud environments like AWS, GCP, and Azure, further enhances its versatility. Whether you’re installing software packages, managing server configurations, or orchestrating complex deployments, Ansible simplifies the process and boosts efficiency. Embrace Ansible’s power, harness the benefits of automation, and embark on a journey towards streamlined operations and accelerated productivity.

Ansible Documentation

Article by Harsh Shrivastav


Leave a Reply