We earn commission when you buy through affiliate links.
This does not influence our reviews or recommendations.Learn more.
Heard about Ansible but not sure what it is?
Dont worry, you will know about Ansible in the next 5 minutes.
What is Ansible?
It is straightforward to deploy; it leverages SSH to communicate between servers.
It uses the playbook to describe automation jobs, and playbook uses a very simple language YAML.
Ansible provides reliability, consistency, and scalability to your IT infrastructure.
you could automate configurations of databases, storage, networks, firewalls using Ansible.
Lets take an example; youve got a debug version of an software that is built on visual C++.
Lets take a look at some of the following features.
SSH Very simple passwordless web connection authentication protocol which is secure.
You see how powerful it can be to push the changes to thousands of servers in minutes.
Setup a minimal requirement and configuration needed to get it to work.
Ansible Architecture
Let us start withPublic/Private Cloudwhich is the Linux server.
It can also act as a repository for all IT installation and configurations.
The above architecture has a bunch ofhostmachines to which ansible server connects and pushes the playbooks through SSH.
It hasansible automation engineusing which users can directly run a playbook which gets deployed on the hosts.
There are multiple components in the ansible automation engine.
The first is ahost inventory.
Its a list of all the IP addresses of all the hosts.
Next, there aremodules.
A playbook contains plays, a play contains different tasks, and a task includes modules.
So, when you run a playbook, those action takes place on your host machines.
you might make your custom modules also.
Then the architecture hasplaybooks.
Playbooks are very simple to write YAML code.
YAML code is a very simple data serialization language; its pretty much like English.
Next, in the architecture areplugins.
Plugins here are special kind of modules.
These plugins get executed before a module is getting executed on the nodes.
Plugins get executed on the main control machine for logging purposes.
Youve got call-back plugins because this enables you to hook into different ansible events for display and logging purposes.
Cache plugins are used to keep a cache of facts to avoid costly fact-gathering operations.
The architecture has connection plugins.
That was all about the architecture.
Next, let me tell you how exactly it works.
How Ansible Works?
Ansible works by connecting to nodes and pushing out small programs called as ansible modules.
Ansible then executes these modules over SSH by default and then remove them when finished.
Ansible management node is the controlling node, which controls the entire execution of the Playbook.
It removes the modules once they are installed.
So thats how ansible works.
Next, you may be interested in learning how to Install and configure Ansible.
Conclusion
I hope now you have an idea about Ansible to get it started.