Use it when choosing a tool to standardise device configuration, or when a run fails or changes more than expected.
Configuration Management Tools
Configuration management tools keep devices in a defined state: Ansible pushes changes with playbooks over SSH or APIs (agentless), Terraform declares infrastructure and applies the difference, Puppet and Chef use agents that pull configuration.
1. Inventory and credentials correct (ansible-inventory --graph, ansible -m ping)?
2. ansible-playbook site.yml --check --diff --limit <pilot> — expected diff?
3. Apply to the pilot; second run shows changed=0?
4. Failure → read the task error and the device log.
5. Roll out in batches (serial).
source of truth → data validated → API or tool authenticated → change applied idempotently → state read back → matches intent
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Troubleshooting approach Narrow the fault
Validate input/prerequisites → connectivity/auth → current state → planned change → execution result → post-state verification → explicit recovery/rollback when the desired state is not reached.
Step 2 Common mistakes Narrow the fault
- Running playbooks without check/diff mode first.
- No version control for templates and variables.
- Storing secrets in plain text in the repository.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Keep playbooks, templates and variables in Git. Always preview (--check --diff, terraform plan), apply to a pilot first, and verify. Idempotent modules (e.g. cisco.ios.ios_config, resource modules) report changed=0 on a second run.
curl -sk -u <user>:<pw> -H 'Accept: application/yang-data+json' https://<device>/restconf/data/ietf-interfaces:interfaces— RESTCONF read.curl -i— HTTP status code and headers (200 OK, 201 Created, 204 No Content, 400, 401, 403, 404).python3 -m json.tool < file.json/jq . file.json— JSON valid and readable.show netconf-yang status/show platform software yang-management process— device API agents running.show ip http server status— HTTPS server for RESTCONF.
ReferenceWhat it is1 section · depth on demand
What it is
Capabilities of automation/configuration management mechanisms such as Ansible and Terraform.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
Configuration management and infrastructure as code
Configuration management keeps device configuration consistent, reviewed and reproducible. Ansible's getting-started guide shows the basic model:
- A control node where Ansible is installed.
- An inventory that lists the managed nodes and groups them.
- Managed nodes whose desired state Ansible maintains.
Desired state is described in playbooks and variables kept in version control. Applying them makes devices match the description.
Building blocks
| Element | Purpose |
|---|---|
| Source of truth | Intended values: VLANs, IP addresses, neighbours (NetBox, YAML files) |
| Templates | Render configuration from variables (Jinja2) |
| Inventory | Which devices, in which groups |
| Playbooks or pipelines | Apply, verify, report |
| Version control | History, review, rollback |
| Compliance checks | Detect drift between intent and the running state |
The change workflow
| Step | Tooling |
|---|---|
| Edit variables or templates in a branch | Git |
| Lint and render | yamllint, template tests |
| Dry run with a diff | ansible-playbook --check --diff |
| Peer review | Pull request |
| Deploy to a test device or site first | Inventory limits |
| Deploy widely, then verify | Playbook verification tasks, monitoring |
Idempotence
A well-written task changes something only if the device differs from the desired state. Running it again reports no changes. That makes repeated runs safe and turns --check into a drift detector.
dev$ tree -L 2
inventory/
hosts.yml
group_vars/access.yml
templates/
access_ports.j2
playbooks/
access.yml
dev$ ansible-playbook -i inventory/hosts.yml playbooks/access.yml --check --diff --limit acc-2f-01
TASK [Configure access ports] ****************************************
--- before
+++ after
@@ interface GigabitEthernet1/0/14
- switchport access vlan 1
+ switchport access vlan 110
changed: [acc-2f-01]
dev$ ansible-playbook -i inventory/hosts.yml playbooks/access.yml --limit acc-2f-01
dev$ git log --oneline -3 -- inventory/group_vars/access.yml
Handling manual changes
Emergency changes made by hand create drift. Either write them back into the source of truth afterwards, or let the next run overwrite them. Decide which deliberately, and document the policy.
Documented example, not captured output.
Quick reference
Configuration management means describing how devices should be configured, storing that description in version control and applying it with tools rather than by hand. The result is consistent configuration, a history of every change and the ability to detect drift. The choice of state in tools like Ansible decides whether a run only adds configuration or also removes anything not declared.
Configuration management keeps devices in a declared, version-controlled state: source of truth (NetBox/Nautobot or YAML), templates (Jinja2), deployment (Ansible, Nornir, NETCONF), and validation (pyATS, Batfish, post-change checks).
- name: Ensure VLANs
cisco.ios.ios_vlans:
config:
- vlan_id: 20
name: USERS
state: merged
States matter: merged adds, replaced replaces per object, overridden removes everything not declared — use it only with a complete source of truth. Run --check --diff before applying.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Automation & Programmability → Configuration Management. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.cisco.com/c/en/us/support/ios-nx-os-software/ios-xe-17/series.html · confidence 94%Deep reference
Exam focus
Exam focus
- CCNA-6.6 — Recognize Ansible/Terraform capabilities. Configuration-management mechanisms.
Additional depth
Ansible and Terraform capabilities
Configuration-management/infrastructure-as-code tools improve repeatability, reviewability and automation. At CCNA scope, recognize that Ansible commonly applies declarative task/playbook workflows over remote transports, while Terraform manages desired infrastructure/resource state through providers.