Configuration Management Tools and Version Control with Git

Data models describe the shape of a network change. Configuration management tools turn that structured intent into repeatable deployment, while Git provides the reviewable history behind each change.

Configuration ManagementGitNetwork AutomationDesired State

Configuration Management Workflow

The operational loop is simple: define the desired state, store the change where it can be reviewed, deploy it through automation, and check that the running environment stays aligned.

Configuration management workflow from desired state through Git version control, automated deployment and maintenance
A configuration workflow connects readable intent, version history, automated deployment and compliance checks.
Nine-part learning path

Network Automation and Programmability Series

Part 5 turns structured data into an operating process that can be reviewed, deployed consistently and checked for drift.

Part 5 of 9

Desired State and Configuration Drift

Desired state is the configuration an environment should have. It can describe a hostname, VLAN, interface policy, NTP source, access rule or service setting. The important shift is that the intended result becomes explicit and reusable instead of living only in a one-time CLI session.

Configuration management flow from desired state through Git, automation tools and managed network devices
Configuration files express intent, Git records the change, and the management tool reconciles that intent with managed systems.
Configuration drift: when the running state no longer matches the approved state. Drift can come from emergency changes, incomplete deployments, inconsistent templates or undocumented manual work.

A Network Change in Real Life

Imagine an operations team needs to add an NTP server and a management VLAN to 40 access switches. A manual approach might mean opening devices one at a time, pasting commands, and keeping notes in a spreadsheet. That process can work for one urgent fix, but it becomes difficult to prove what was changed, which devices were missed, and whether every switch received the same values.

With configuration management, the engineer describes the intended settings once and supplies the device-specific values as data. The tool can check connectivity, apply the change to a small pilot group, show the proposed difference, and then continue through the remaining switches after review. The engineer still decides the scope and approves the change; automation simply makes the approved process consistent.

This distinction matters. Configuration management is not an excuse to press a button against every device. It is a way to make the button operate inside a controlled workflow with an explicit target list, a visible change, and a verification step.

What Belongs in the Source of Truth?

A useful repository contains the information needed to reproduce an approved result. That often includes inventory data, templates, variables, automation tasks, validation checks and documentation. Keeping these pieces together helps another engineer understand both the desired setting and the method used to apply it.

The source of truth should not contain passwords, private keys or long-lived tokens in plain text. Secrets belong in a protected secret store or an approved CI/CD variable system, while the repository contains references to those secrets and the permissions needed to use them. A configuration file that is easy to read but unsafe to protect is not a good automation asset.

Practical boundary: Git records the approved intent and the history of the workflow. The management tool connects to devices and reports the result. Monitoring systems confirm whether the environment continues to match the intent.

What Configuration Management Tools Provide

A configuration management tool gives the workflow an execution and verification layer. It reads variables and templates, connects to targets, applies only the necessary change, and reports what happened.

Enforcement

Apply a defined configuration and check whether the target remains aligned with it.

Abstraction

Use a readable model or task language while the tool handles device-specific connection details.

Repeatability

Run the same workflow across many devices with consistent inputs and predictable validation.

Reporting

Show changed, unchanged, failed or unreachable targets so an operator can act on evidence.

The best result is not always a long list of changes. A healthy run may report that most devices were already correct and required no action. That is useful information: it shows the workflow is idempotent, meaning repeated runs converge on the same intended state instead of adding another change every time.

How to Choose a Configuration Management Tool

Tool choice should follow the environment and the operating model, not popularity alone. Start with the targets: network operating systems, servers, cloud services and security appliances may expose different connection methods and data models. Then consider whether the team needs continuous enforcement, scheduled runs, event-driven jobs, or an operator-approved change pipeline.

QuestionWhy it mattersWhat to check
How are targets reached?Connectivity determines whether an agent or central controller is practical.SSH, HTTPS, NETCONF, RESTCONF, WinRM, API support and firewall paths.
Who approves changes?A tool should fit the team's review and separation-of-duties process.Branches, pull requests, change windows, approvals and audit logs.
How is state verified?Deployment without validation can create silent drift.Read-back checks, command verification, API responses and compliance reports.
How is failure handled?Large changes can produce partial success.Dry runs, batching, retries, checkpoints, backups and rollback procedures.

Ansible is often approachable for network teams because it can use existing protocols and readable YAML tasks. Puppet and Chef use a stronger agent-oriented model in many deployments. The important lesson is to evaluate the workflow your organization can operate reliably, including inventory, credentials, logging and recovery.

Agent-Based and Agentless Approaches

Tools differ in how they reach managed systems. The choice affects installation, connectivity, scale, security boundaries and the kinds of environments they fit best.

Comparison of agent-based and agentless configuration management for routers, switches and servers
Agent-based systems depend on software on the target; agentless systems use supported protocols from the management side.
ApproachHow it worksTypical consideration
Agent-basedA service runs on each managed host and communicates with a central system.Can provide continuous enforcement, but requires lifecycle and software management on targets.
AgentlessThe controller connects using existing protocols such as SSH, HTTPS or WinRM.Fast to introduce on network devices, but depends on reachability and appropriate device support.

Why Git Belongs Beside Automation

Git is the history and collaboration layer for configuration files, templates, variables and automation code. It does not replace a deployment tool. Instead, it gives the team a reviewable source of truth before a tool changes production.

Git version control workflow from engineer changes through commit, remote repository, collaboration and rollback
Git gives network automation a visible path from an engineer's edit to review, collaboration, deployment and recovery.
  1. Edit. Change a template, variable or task in a working branch.
  2. Review. Compare the difference and ask whether the intended state is correct.
  3. Commit. Record a focused change with a message that explains the operational reason.
  4. Share. Push the branch to a remote repository and open a review.
  5. Deploy. Run validation and the approved automation workflow.
  6. Recover. Use history to understand what changed or restore a known-good version.

A good commit message answers a future question: what changed and why? “Update access switch template” is better than “fix stuff,” but a message such as “Add NTP source for branch switches” gives reviewers and incident responders much more context. Small commits also make it easier to identify the exact change associated with an outage or an unexpected device result.

git switch -c add-branch-ntp
git diff
git add inventory/branch-switches.yml templates/ntp.yml
git commit -m "Add NTP source for branch switches"
git push -u origin add-branch-ntp

These commands do not deploy anything by themselves. They prepare a change for review. Deployment should happen only after the repository checks, peer review and operational approvals that your environment requires.

A Safer Change Workflow

Before deployment

  • Confirm the target inventory and scope.
  • Validate syntax, variables and required fields.
  • Review the diff and expected operational impact.

After deployment

  • Check the tool result and device reachability.
  • Read back important state or configuration.
  • Record failures and decide whether to retry or roll back.

Use batches when the change affects a large fleet. A pilot group can reveal an unexpected platform difference before it becomes a fleet-wide incident. After the pilot, pause long enough to examine logs and device state, then continue with a deliberate batch size. The exact number depends on the risk of the change, the maintenance window and the quality of the rollback plan.

Verification should check more than a successful connection. A device can accept a command while the resulting service remains unavailable, a route is missing, or a policy has the wrong scope. Pair configuration checks with an operational test such as interface state, reachability, routing neighbors, telemetry or an application health probe.

When Automation Does Not Go as Planned

A mature workflow expects partial results. Some devices may be offline, some may already contain a conflicting manual change, and some platforms may reject a field that another platform accepts. Treating every non-success result as identical makes troubleshooting harder.

ResultMeaningNext action
UnchangedThe target already matches the desired state.Record it as a successful convergence result.
ChangedThe tool applied the intended difference.Run post-change validation and keep the result with the change record.
FailedThe target rejected or could not complete the operation.Pause the batch, inspect the error and decide whether correction or rollback is appropriate.
UnreachableThe tool could not establish a session.Check DNS, routing, ACLs, credentials, maintenance state and device health.

Rollback is not always a single command. A previous Git version may restore the intended file, but the deployment still needs to be run and verified. Some changes also have dependencies or irreversible effects. That is why backups, pre-change snapshots, staged rollout and a documented recovery decision are more valuable than assuming every change can be instantly undone.

How This Leads to Cisco DNA Center

You now have the operating pattern behind larger automation platforms: structured intent, versioned changes, an execution engine and post-change verification. The next lesson applies that pattern to Cisco DNA Center and its controller-based workflows.

Configuration Management Tools and Version Control with Git Frequently Asked Questions

What is configuration management in networking?

It is the practice of defining, applying and checking device or system settings so infrastructure stays aligned with an intended state.

What do configuration management tools do?

They compare intended and current state, apply required changes and report the result across managed targets.

Why is Git useful for network automation?

Git records changes, supports review and collaboration, and provides history for comparison or rollback.

What is configuration drift?

Drift is the difference between the approved intended state and the settings actually running on a device or system.

Are agentless tools better?

Agentless tools can be convenient for network devices, but the best approach depends on connectivity, target support, security and operational requirements.

Should Git deploy directly to network devices?

Git should provide the reviewed source of truth. A configuration management workflow should validate and deploy the approved change.