Lesson 1 / 26

What Ansible Is

Explain agentless, push-based, declarative automation and where Ansible fits.

Automation without agents

Ansible is an open-source automation tool for configuring servers, deploying applications and orchestrating tasks. It is agentless: nothing is installed on the machines you manage; the control node connects over SSH (or WinRM for Windows), runs small modules, and removes them. You describe the desired state in readable YAML (a playbook), and Ansible makes the hosts match it. Because most modules are idempotent, running the same playbook again changes nothing if the system is already correct.

Control node to managed nodes

Your control node reads inventory and playbooks, connects to hosts over SSH and runs small modules there.

Four stages: inventory, playbook, connection, modules.
Figure 1.1 — Inventory, playbook, connection and modules.

A recipe, not a to-do list

A shell script says "run these steps". A playbook says "the kitchen should end up with these dishes ready". If a dish is already ready, the cook skips it.

Know the alternatives

Terraform provisions infrastructure (create servers, networks); Ansible configures what runs on it. Puppet and Chef use agents. Many teams use Terraform and Ansible together.

Quick check: What does "agentless" mean for Ansible?

  • It cannot use SSH
  • It has no control node
  • Nothing needs to be installed on managed hosts
  • It only runs on one machine
Answer

Nothing needs to be installed on managed hosts — Ansible connects over SSH and runs modules temporarily, so no resident agent is required.