# devops / automation / ansible 101
Introduction to Ansible
Ansible is an open-source, agentless automation tool by Red Hat. It uses simple, human-readable YAML files called playbooks to automate configuration management, application deployment, and orchestration across your entire fleet.
Key Characteristics
Ansible is designed to be minimal in nature, consistent, and highly reliable. Here is what makes it stand out from legacy configuration tools.
Agentless
No agents are required on managed nodes. It natively uses SSH for Linux/UNIX systems and WinRM for Windows.
Declarative Playbooks
You describe the desired state in YAML; Ansible figures out the exact commands and steps needed to get the system there.
Idempotent Modules
Tasks are safe to run multiple times. If a system is already in the desired state, Ansible recognizes this and does absolutely nothing.
Extensible
Custom modules, plugins, and roles allow you to flexibly extend Ansible to orchestrate complex workflows, cloud providers, and networking devices.
How Ansible Works
Ansible operates on a simple push-based architecture from a central control node out to your infrastructure.
Core Components
- Control Node
The machine where you run
ansibleoransible-playbook(requires Linux/macOS with Python). - Managed Nodes
The target servers, network devices, or virtual machines being automated.
- Inventory
A list (INI or YAML format) defining your managed hosts and organizing them into groups.
- Modules
Reusable units of code that execute tasks (e.g., package, file, service).
- Playbooks
An ordered list of plays (which map target hosts to specific tasks).
Modules & Quick Commands
Common Module Categories
- System
user,group,package,service - File
copy,template,file - Command
command,shell - Networking
nxos,ios,eos,junos - Cloud / App
aws,azure,gcp,docker,kubernetes
Automation Types: Push vs Pull
Configuration management tools generally fall into two architectural paradigms. Ansible uses the Push model, which is why it doesn't require agents.
| Feature | Push Architecture 🚀 | Pull Architecture 🧲 |
|---|---|---|
| Mechanism | Control node sends instructions directly to the servers. | Servers continuously fetch configs from a central master server. |
| Agent Requirement | No agents needed (Agentless). | Requires a background agent running on every host. |
| Speed | Immediate execution when triggered. | Execution depends on the agent's polling interval. |
| Tool Examples | Ansible, Terraform | Puppet, Chef |