Ansible Architecture
When I started learning Ansible, one of the first things I wanted to understand was how it actually works internally. My trainer explained the architecture in a simple way, and once I understood the flow, everything else in Ansible became easier.
In this blog, I’m sharing Ansible Architecture exactly how I understood it during my DevOps training.
⭐ How I Understand Ansible Architecture
Ansible’s architecture is simple and lightweight. There are mainly three major components:
-
Control Node (Controller)
-
Managed Nodes (Target Machines)
-
Inventory File
Ansible uses SSH to connect to servers — no agents, no background services, no complicated setup.
⭐ 1. Control Node (Where Ansible Runs)
This is the machine where Ansible is installed.
From here, I run:
-
ad-hoc commands
-
playbooks
-
inventory operations
-
automation tasks
During my practice, I used an Ubuntu EC2 instance as the controller.
The controller is the “brain” of Ansible.
⭐ 2. Managed Nodes (Servers I Control)
These are the remote servers where Ansible performs tasks like:
-
installing packages
-
creating users
-
deploying applications
-
starting services
What I found interesting:
👉 Managed nodes don’t need Ansible installed.
👉 SSH access is enough.
This is why Ansible is called agentless, and this is one of the biggest reasons teams prefer it.
⭐ 3. Inventory – Server List
The inventory tells Ansible which servers to connect to.
Example INI format I used:
YAML example:
Inventory is basically the “address book” for Ansible.
⭐ Architecture Diagram (How I Visualized It)
This diagram made the architecture very easy for me to remember.
⭐ Putting It All Together (My Practice Flow)
Here’s how everything fits when I run a playbook:
-
I install Ansible on the controller
-
I create an inventory with my server IPs
-
I write a YAML playbook
-
I run it using
ansible-playbook -
Ansible connects via SSH
-
Modules execute tasks
-
Server configuration changes automatically
This simple workflow made automation feel powerful and smooth.
⭐ Quick Example (Architecture In Action)
Inventory:
Playbook:
Command:
Ansible → SSH → Managed Node → Task Completed ✔
⭐ Final Thoughts
Ansible’s architecture is one of the simplest in DevOps.
No agents, no extra services — just:
-
one control machine
-
multiple target machines
-
one inventory
-
and SSH
Once this clicked for me, learning modules, playbooks, and inventory management became much easier.
Next, I will write about Ansible Modules — the building blocks of all automation.
Comments
Post a Comment