SciDatajourney

How the Ansible Works?

Hello everyone, welcome back to this session. So today in this session we’re going to see how the ansible works, right? So without wasting any time, let’s go ahead and start with this session.

So guys, Ansible as we know is nothing but a configuration management tool right now. At the core of this tool, you have something called an Ansible playbook.

How the Ansible Works in the functioning of the Ansible ecosystem

Right now concerning the fact whatever Ansible does, it cannot go or it cannot bypass an Ansible playbook. An Ansible playbook is the place where you put in code what exactly you want to configure on the remote systems, right?

So whatever you write on the Ansible playbooks is executed by Ansible on the remote system. So that’s why the Ansible playbook plays a key role in the functioning of the Ansible ecosystem.

All right now Ansible playbooks are written in YAML, right? So YAML is nothing but it’s yet another markup language, right?

OK, Now let’s take an example here. Let’s say Josh is a guy who wants to configure remote systems with a particular software, in this case, it’s Apache Tomcat, right?

how the ansible works

Now, how would you do that? So what will Josh do? Josh will write an Ansible playbook in which he will specify what kind of software he wants to install on the remote systems.

Now once he has specified everything in the Ansible playbook, he will deploy this Ansible playbook on the Ansible master and the Ansible slaves. All this software will be installed right?

So instead of going to each system, this is exactly what configuration management is, instead of going to each system to install the software, he will write one place, he will write in one place the Ansible playbook.

In that playbook we will define all the tasks that have to be done on the remote systems in one central place, that is the Ansible master.

Run that playbook and everything will be executed on the remote systems. Now, this is how Ansible works, right? You do not have to deal with the agents directly on the Ansible master.

You write the code in a code file, which is called Ansible Playbook. You run that code file and everything is executed on the remote system.

Conclusion

In conclusion, we have learned how the ansible works through example. Ansible stands out as a great option for automation in a variety of IT contexts due to its adaptability, simplicity, and scalability.

Ansible gives you the power to streamline processes, boost productivity, and keep control whether you’re overseeing a modest infrastructure or organising intricate workflows.

1 thought on “How the Ansible Works?”

Comments are closed.