Ansible is a configuration-management and automation tool that installs software, changes settings, and orchestrates tasks across many servers from a single control machine. Its defining trait is that it is agentless: it connects over plain SSH (or WinRM on Windows) and needs nothing installed on the managed hosts beyond Python. You describe the desired state in YAML playbooks, and Ansible connects to each host and makes it so.
Playbooks, modules, and inventory
A playbook is a YAML file listing tasks, each calling a module - a unit of work like installing a package, copying a file, or starting a service. An inventory lists the hosts and groups the playbook runs against. Modules are written to be idempotent: a task says "this package should be present," and Ansible installs it only if it's missing, so re-running a playbook converges without making redundant changes.
- hosts: webservers
become: true
tasks:
- name: Install nginx
apt:
name: nginx
state: present
- name: Start nginx
service:
name: nginx
state: started
enabled: true
Push model and agentless operation
Ansible uses a push model: you run it from a control node and it pushes configuration out to targets, rather than agents on each host pulling from a server. Being agentless lowers the barrier to adoption - there's no agent to install, secure, and upgrade on every machine - and makes it easy to manage network devices and appliances. The tradeoff is that very large fleets push more slowly than a pull-based system like Chef that has each node fetch its own config.
Where it fits
Ansible suits configuration management, application deployment, and ad-hoc orchestration where simplicity matters - the YAML is readable and the learning curve is gentle. It's commonly paired with a provisioning tool (you create servers with Terraform or a cloud-native tool, then configure them with Ansible). For data engineers it's a frequent way to stand up and configure cluster nodes, databases, and pipeline hosts consistently.
Frequently asked questions
Why is Ansible agentless an advantage? It connects over SSH with only Python on the target, so there's no agent to install, secure, or upgrade across the fleet - fast to adopt and able to manage devices that can't run agents.
Is Ansible push or pull? Push - a control node sends configuration to targets. (Chef and Puppet use a pull model where nodes fetch their own config.)
What makes a playbook safe to re-run? Modules are idempotent: they declare desired state and change a host only when it differs, so repeated runs converge without duplicate side effects.