Configuration Management Tools
Puppet, Chef and Ansible are the three configuration-management tools the CCNA names. They all enforce a desired state across many devices, but they differ in one crucial respect: whether software has to be installed on the managed device (agent-based) or not (agentless).
Infrastructure as code
Infrastructure as code (IaC) means defining your infrastructure — servers, switches, firewall rules, VLANs — in text files that live in version control, rather than in the heads of engineers or the running configurations of individual devices. The device configuration becomes an output, generated from source files.
Configuration-management tools are the engines that apply IaC. They all work in the declarative style from Lesson 1: you write the desired state, the tool checks the current state, and it makes the changes needed to converge — safely, repeatedly and idempotently. Where they differ is how they reach the managed device.
| Model | How it works | Examples |
|---|---|---|
| Agent-based (pull) | Software is installed on each managed device; it periodically pulls policy from a central server. | Puppet, Chef |
| Agentless (push) | No software on the device; the tool connects in over a standard protocol such as SSH and pushes changes. | Ansible |
Agent-based vs agentless
This single architectural choice decides which tool fits which estate. An agent-based tool installs a small program on every managed device; that agent periodically contacts a central server, pulls the policy it should apply, and converges the device. An agentless tool installs nothing at all — the tool itself connects in over SSH and pushes the change when you run it.
Puppet
Puppet is an agent-based configuration-management tool. Each managed device runs the Puppet agent, which contacts a central Puppet master on a schedule and pulls the configuration it should apply. Puppet is written in Ruby and uses its own declarative language.
- Configuration is written as manifests — files with a
.ppextension containing declarative resource declarations. - A resource describes one thing that must exist in a certain state, for example a package, a file or a service.
- The agent compares the actual state with the desired state and makes only the changes needed — idempotent convergence, exactly as described in Lesson 1.
- Because the agent pulls, Puppet naturally keeps devices continuously compliant and can correct drift on its next run.
# Puppet manifest (declarative desired state)
package { 'ntp':
ensure => installed,
}
service { 'ntpd':
ensure => running,
enable => true,
}
Chef
Chef is also agent-based. It uses a central Chef server and an agent called chef-client installed on each managed node. Where Puppet uses manifests, Chef organises its configuration into recipes and cookbooks, and its language (the Chef Infra DSL) is Ruby-based.
- A recipe is a collection of resources describing a desired state — the basic unit of configuration.
- A cookbook is a bundle of recipes (plus files and templates) that configures a particular piece of software or role.
- The chef-client runs on the node, pulls its run-list from the server, and converges the node to the desired state.
# Chef recipe (Ruby-based DSL, declarative resources) package 'ntp' do action :install end service 'ntpd' do action [:enable, :start] end
Ansible
Ansible is the odd one out: it is agentless. Nothing is installed on the managed devices. Instead a control node connects to each device over a standard protocol — usually SSH — and pushes the configuration. This is why Ansible is the most popular tool for network automation: routers and switches cannot run a Puppet or Chef agent, but they all support SSH.
- Configuration is written as playbooks — YAML files describing the desired state (or the ordered tasks to reach it).
- A playbook is a list of plays; each play runs one or more tasks against a group of hosts taken from an inventory.
- Ansible pushes rather than pulls, connecting on demand when the playbook is run, so there is no background daemon to manage.
- Modules are idempotent: a task that sets a VLAN to a value checks first and only changes the device if it differs.
# Ansible playbook (YAML)
- name: Ensure NTP is configured
hosts: switches
tasks:
- name: Enable NTP
ios_config:
lines:
- ntp server 10.0.0.1
Comparing the three, and choosing one
| Feature | Puppet | Chef | Ansible |
|---|---|---|---|
| Architecture | Agent-based | Agent-based | Agentless |
| Transport | Agent pulls from master | chef-client pulls from server | Control node pushes over SSH |
| Language | Puppet DSL (.pp) | Ruby-based DSL | YAML (playbooks) |
| Building blocks | Manifests/resources | Recipes/cookbooks | Playbooks/tasks/modules |
| Model | Declarative | Declarative | Declarative (task order possible) |
| Network fit | Limited (needs agent or proxy) | Limited (needs agent or proxy) | Strong (SSH is universal) |
For a general-purpose server estate any of the three works well, and the choice often comes down to team skills and existing investment. For a network estate the agent requirement usually decides it: because traditional network devices cannot host agents, the agentless model of Ansible tends to fit naturally. That is why Ansible appears most often in network-automation discussions, and why its YAML playbooks connect straight back to the data-format lesson you just finished.
Whichever tool is used, the goal is the same one established in Lesson 1: express the desired state as code, apply it idempotently, and let the tool keep the network converged — detecting and correcting the configuration drift that manual administration always produces.
Review
Check what you have learned with these review questions.
| Key term | Meaning |
|---|---|
| Infrastructure as code | Defining infrastructure in version-controlled text files rather than manual configuration. |
| Agent-based | Model where software is installed on each managed device (Puppet, Chef). |
| Agentless | Model where no software is installed; the tool connects in over SSH (Ansible). |
| Puppet manifest | A declarative .pp file of resource declarations. |
| Chef recipe | A set of resource declarations; bundled into cookbooks. |
| Cookbook | A packaged collection of Chef recipes for a role or application. |
| Ansible playbook | A YAML file of plays and tasks applied to hosts from an inventory. |
| Idempotent convergence | Making only the changes needed so the device reaches the desired state. |
- Cisco. CCNA (200-301) Exam Topics, Domain 6.0 Automation and Programmability. cisco.com.
- Red Hat. What is Ansible? redhat.com.
- Puppet. Puppet Documentation. puppet.com/docs.
- Chef (Progress). Chef Infra Documentation. docs.chef.io.
- Cisco. Ansible Network Automation. developer.cisco.com.
Sources & references
- Cisco. CCNA (200-301) Exam Topics, Domain 6.0 Automation and Programmability. cisco.com.
- Red Hat. What is Ansible? redhat.com.
- Puppet. Puppet Documentation. puppet.com/docs.
- Chef (Progress). Chef Infra Documentation. docs.chef.io.
- Cisco. Ansible Network Automation. developer.cisco.com.
Target exams: CCNA 200-301 v1.1 · CyberOps Associate 200-201. Last content verification: 2026-10-11.