What is Ansible and how it is different from other configuration management tools?

What is Ansible and how it is different from other configuration management tools?

Brief introduction of Ansible.

ยท

4 min read

Before discussing what is ansible, let's take a look at some of the initial stuff.

System Administration ๐Ÿ–ง

A system administrator is a person who manages all the systems in an organization like which applications to install in a particular machine, change the IP address of an OS, or make other users in an OS.

Problems ๐Ÿ˜“

  • The management of the systems would be easy if there are few servers but if there are 1000 or more servers then it would be very difficult for one person to manage all of them in a short period of time.

  • If there are many system administrators then as humans they could make mistakes or maybe a company has not enough budget to hire them.

Solution ๐Ÿค—

The solution is automation. The role of a system administrator is replaced with DevOps engineers.

  • Configuration: Each and every detail of your machine(server, storage).

  • Management: Delete, update, and create the details.

The configuration management tool is a part of operations in DevOps. The configuration management tool is of two types:

  1. Push-based
  2. Pull-based

1. Push-based:

  • Push-based configuration server pushes the configuration to the nodes.

  • All the data will be present inside one server and that server will push the data and update their versions to other nodes.

  • Push-based configuration is used when you want full control over other nodes and you don't want to send the data until you want.

  • Examples of push-based tools are Ansible and SaltStack.

Graph of Push-based configuration

Screenshot 2022-11-11 15:23:23.png

2. Pull-based

  • The nodes themselves check and contact the server periodically(after some time) and fetch the configuration and update the version from it.

  • Examples of pull-based tools are CHEF and Puppet.

  • Pull-based configuration is used when you add multiple nodes. After that, you don't need to configure them manually. Instead, they will do it automatically.

Graph of Pull-based configuration

seond.png

What is Ansible? ๐Ÿš€

  • Ansible is a configuration management tool that will automate the processes of the nodes. It will control, and manage the servers automatically so that you don't have to do it manually.

  • It is a push-based configuration tool.

  • Michael Dehaan developed ansible and it began in February 2012.

  • RedHat acquired it in 2015.

  • Ansible is available for RHEL, Debian, CentOS, Oracle Linux, and Windows.

  • It can be used on-premises or in the cloud.

  • It turns your code into infrastructure. It means if you want the particular infrastructure, write a code, run it and it will do that for you.

server.png

  • There is no middleman required in this mechanism.

  • Ansible uses YAML to transfer data.

  • It communicates with the help of ssh.

  • It is agentless. It means that as in chef, the node was containing the chef-client agent to communicate with the chef-server. Here there is no agent required.

  • The file in which the recipe or the data is written is called a playbook.

If you want to know the differences b/w infrastructure and configuration then I have written an article for you to check out. It will show you role of Ansible in the DevOps lifecycle.

If you also want to check the DevOps best practices then this article will definitely help you.

Now let's take a look at the advantages and disadvantages of the ansible.

Advantages ๐Ÿ‘

  • Ansible is free to use for everyone.

  • It is very lightweight and is not specific to any OS.

  • It is very secure due to its agentless capabilities and SSH security features.

  • Ansible does not need any special system administrator skills to install and use it.

  • It follows the push-based mechanism to push the data. I won't accept the requests that are coming every time to disturb it. It means that ansible has the control to push the data at the desired time it wants.

Disadvantages ๐Ÿ‘Ž

  • Insufficient user interface. Although ansible-tower is GUI it is still in the development stage.

  • You can't achieve automation by ansible because somehow you have to be involved in it to push the data.

  • It is new to the market. Therefore it has limited support and documentation is available.

Conclusion

We have explored the role of system administrators and what were the problems that they were facing. Then we provided you the solution that there are two ways through which the configuration data will be transferred and what are the differences b/w them.

We also saw the brief introduction of one tool that is well-known and used for the configuration.

That's it.

You can follow me on YouTube, Twitter, and LinkedIn.

Thank you for reading, and I hope you enjoyed this article as much as I did.

ย