In this episode we will trace the evolution of infrastructure automation, the history of Ansible's birth, and understand why the agentless approach it brings has become the top choice in the modern era.

After episode 0, where we discussed and prepared all the prerequisites — from Linux CLI, SSH, and YAML skills to installing Ansible on the Control Node — in this episode we will take a break from the hands-on work and dive into why Ansible exists. We will trace its history, understand the real problems that triggered its creation, and see why Ansible has become one of the most popular tools in the DevOps and SRE world.
Why is understanding the history and background important? As an engineer, you don't only need to know how to operate a tool, but also why that tool was designed a certain way. This understanding will guide you in making architectural decisions in the real world: when to use Ansible, when to use Terraform, when to write plain shell scripts, and when all three should work together. Without this context, you will only become a tool operator — not an infrastructure engineer.
To understand Ansible, we have to look at the long journey of how humans managed servers throughout the ages.
Before the automation era, managing servers meant logging in one by one via SSH and typing commands manually. Want to install nginx on 5 servers? Log in to server 1, install, log in to server 2, install, and so on. Not to mention the configuration drift problem — the condition where each server "drifts" from its ideal state because commands are typed manually and forgotten to be recorded. Server 1 might have nginx version 1.2 installed, while server 3 is still on version 1.0 because someone forgot to update it.
The main problem is clear: an undocumented process cannot be reproduced, cannot be audited, and cannot be scaled. A single server can still be handled, but what about 50 servers, 500 servers, or thousands of servers?
The next logical step was partial automation using shell scripts. Instead of typing manually, we write a bash script and run it on many servers with an SSH loop.
#!/bin/bash
# install_nginx.sh - the painful old approach
SERVERS=("10.0.0.11" "10.0.0.12" "10.0.0.13")
for server in "${SERVERS[@]}"; do
echo "=== Processing $server ==="
ssh devops@"$server" "sudo apt update && sudo apt install -y nginx"
if [ $? -eq 0 ]; then
echo "OK: $server"
else
echo "FAILED: $server" >> errors.log
fi
doneAt first glance this approach seems to work. But let's break down its weaknesses, because it is precisely from these weaknesses that Ansible was born:
if [ $? -eq 0 ] at every step. The longer the script, the more fragile it gets.apt command on Ubuntu differs from dnf on Rocky Linux. The script has to branch out for each distro.Out of that frustration was born the Infrastructure as Code (IaC) paradigm — treating infrastructure configuration as code that can be versioned in Git, reviewed, tested, and re-applied consistently. One of its manifestations is the Configuration Management (CM) tool: software that describes the desired state of a server, then ensures the server always stays in that state.
It was in this era that a generation of tools appeared: CFEngine (1993), Puppet (2005), Chef (2009), SaltStack (2011), and then Ansible (2012). Each offered an answer to the same problem, but with different architectural philosophies — and this is where Ansible found its differentiator.
Ansible was created by Michael DeHaan in 2012. Before Ansible, DeHaan was the creator of Cobbler — a Linux provisioning automation tool — and had worked at Red Hat. His experience managing many servers and seeing how complicated the existing agent-based solutions were led him to a simple yet revolutionary question:
"Why do we have to install a daemon/agent on every server just to manage its configuration? Why can't we simply use the SSH that's already there?"
From that question, Ansible was born with an agentless architecture. In 2015, Ansible was officially acquired by Red Hat, which then developed it into the Ansible Automation Platform (AAP) product. Red Hat's presence brought enterprise weight: official support, certifications, a vast Collection ecosystem, and even a web interface (AWX/Tower) for large-scale organizations.
Now that we understand its history, let's discuss why Ansible has won the hearts of so many engineers. There are three main pillars that set it apart.
This concept is Ansible's biggest differentiator. Tools like Puppet and Chef require you to install an agent (daemon) on every managed server. That agent runs continuously, communicates with a master server, and becomes part of the system that must be maintained, updated, and monitored.
Ansible works the opposite way: no agent, no daemon, no extra ports opened. Ansible simply uses SSH (or other already-existing protocols) to get into the server, execute commands, and leave.
The practical implications are huge:
Tip
Think of it as the difference between renting a car and buying a car. Agent-based is like buying a car — there's regular maintenance cost (agent upgrades), and if the car (agent) breaks down, the vehicle (server) can't run. Ansible is like hiring a driver: we just give instructions, the driver arrives, does the work, then leaves.
Idempotency is the property where an operation executed repeatedly produces the same end result without additional side effects. It's a mathematical concept that became a core principle of Configuration Management.
Let's compare it with a plain shell script:
useradd devopsRun it once → succeeds. Run it twice → error user 'devops' already exists. An imperative script doesn't know the server's state; it just executes commands blindly.
Now compare that with how Ansible does it:
- name: Pastikan user devops ada
ansible.builtin.user:
name: devops
state: presentAnsible's user module checks the server's state first. If the user already exists, the module reports ok and does nothing. If it doesn't exist yet, the module creates it and reports changed. The end result is always the same: the devops user exists on the server.
This idempotency is what solves the configuration drift problem we discussed at the beginning. Run the playbook in the morning, at night, or after a server rollback — the result is always consistent with the desired state we wrote.
Try comparing the two ways of describing "install nginx" below:
sudo apt update
sudo apt install -y nginx
sudo systemctl enable nginx
sudo systemctl start nginx- name: Pastikan nginx terinstall dan berjalan
ansible.builtin.apt:
name: nginx
state: present
ansible.builtin.service:
name: nginx
state: started
enabled: trueYAML describes what we want to achieve (desired state), not how to do it (step-by-step procedure). The consequences:
So that you can position Ansible correctly, let's compare it with similar tools in the automation ecosystem.
| Tool | Architecture | Language | Primary Focus | Strengths | Weaknesses |
|---|---|---|---|---|---|
| Ansible | Agentless (SSH/WinRM) | YAML (declarative) | Configuration management, app deployment, orchestration | Easy to start, no agent needed, one all-rounder tool | Needs Python on the target, connection must always be available |
| Puppet | Agent-based (client-server) | Ruby DSL (declarative) | Configuration management | Very large scale, rich state model | Complex, needs master + agent, steep learning curve |
| Chef | Agent-based (client-server) | Ruby (imperative) | Configuration management | Flexible, good for Ruby lovers | Needs agent + master, Ruby learning curve |
| SaltStack | Hybrid (agent + agentless) | YAML + Python | Configuration management, remote execution | Very fast (ZeroMQ), flexible | Complex, smaller ecosystem than Ansible |
| Terraform | Agentless (Cloud API) | HCL (declarative) | Infrastructure provisioning (IaC) | Manages the whole cloud infrastructure lifecycle | Not for OS configuration/package installation |
Important
A classic beginner mistake is treating Terraform and Ansible as competitors that replace each other. In fact, they complement each other: Terraform creates the infrastructure (VM, VPC, subnet, database), while Ansible configures that infrastructure (install software, set up services, deploy applications). In production, the most common workflow is Terraform -> Ansible -> CI/CD.
The choice between agentless and agent-based is a fundamental architectural decision:
This is a difference you must hold on to firmly:
The analogy: Terraform is the contractor who builds the house (structure, walls, ceiling), while Ansible is the interior decorator who fills the house (furniture, lights, decorations). Both are needed to produce a livable home.
Let's close with a concrete case study showing why Ansible wins. The scenario: we have 3 web servers that must always have nginx, curl, and htop installed.
With the SSH loop approach, every time there's a new server we have to run a script, monitor the output, and hope nothing errors halfway through. Now with Ansible, we just write a playbook once:
---
- name: Konfigurasi dasar web server
hosts: webservers
become: true
tasks:
- name: Update apt cache
ansible.builtin.apt:
update_cache: true
- name: Install package wajib
ansible.builtin.apt:
name: "{{ item }}"
state: present
loop:
- nginx
- curl
- htopThen run it against all servers at once:
ansible-playbook -i inventory.ini webserver.ymlPLAY RECAP *********************************************************************
10.0.0.11 : ok=4 changed=3 unreachable=0 failed=0 skipped=0
10.0.0.12 : ok=4 changed=3 unreachable=0 failed=0 skipped=0
10.0.0.13 : ok=4 changed=3 unreachable=0 failed=0 skipped=0Notice a few things that changed drastically compared to the manual script:
ok/changed/failed), making auditing easy.ok with no changes (changed=0).This is the essence of the paradigm shift from imperative scripting to declarative automation that Ansible brings.
In episode 1 we traced the journey from manual server management, through painful shell scripting, to the birth of the Infrastructure as Code and Configuration Management paradigms. We also understood why Ansible — with its agentless philosophy, idempotency, and declarative YAML — has become such a popular choice since Michael DeHaan created it in 2012, up to today under Red Hat.
Key takeaways from this episode:
In episode 2, we will go deeper into Ansible's internals: core concepts and main architecture. We will dissect how Ansible actually works behind the scenes, from the Control Node and Managed Nodes, to module execution flow over SSH, to key components like Inventory, Playbook, Tasks, Modules, and ansible.cfg. Keep your enthusiasm up, because starting next episode we will be touching real command lines and configuration files more and more! 😄