Pcornel
Browse topics
Options
Recent
Favorites
Automation · Technical reference

Drift · Configuration Management

Direct answer

Drift is when a system's actual configuration no longer matches the managed definition, usually because of manual changes, failed runs or other tools changing the same settings.

When to use this

Use this when systems differ from their managed definition.

First 30 seconds

1. Drift: actual state diverges from desired (manual changes, other tools, updates).

2. Detect regularly.

3. Correct or codify.

4. Find the source.

5. Avoid tool overlap.

Operational verification

desired vs actual → drift

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
configuration-management automation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

Platformconfiguration-management automation · Automation implementations are tool and platform specific. Use the adjacent Domain for the technology being automated and this Domain for automation behavior.
Scope / prerequisiteUse this when systems differ from their managed definition.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

3 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification path Verify boundary

Record definition revision, inventory target ID, resource/task identity and execution/run ID; inspect the runtime/control-plane result; then query the managed host/service/file/package configuration and its consumer-visible behavior through an independent read path and compare it with the versioned intent. The negative fixture should deliberately exercise risks such as inventory drift, variable precedence surprises, template rendering errors, non-idempotent modules, partial convergence and green task status with unhealthy service, choosing the cases most relevant to desired-versus-actual comparison, normalization, ignored/computed fields, drift ownership and safe convergence rather than blind Set/reapply. For Configuration Management → Drift, the evidence must connect the control-plane result to the managed host/service/file/package configuration and its consumer-visible behavior and explain any gap between desired, controller-reported and consumer-visible state.

Step 2 Common mistakes Narrow the fault
  • Accepting drift as normal.
Step 3 Where it fails Narrow the fault

Failure analysis for Configuration Management → Drift should follow the path through the components: source/inventory → variable/template resolution → module/resource evaluation → target mutation → convergence result → service/application read-back. Common failure classes include inventory drift, variable precedence surprises, template rendering errors, non-idempotent modules, partial convergence and green task status with unhealthy service. Before retrying a mutating operation, read current target state using the stable identity definition revision, inventory target ID, resource/task identity and execution/run ID; if state is unknown, stop broad retries.

Evidence references

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.

observation · 1
Key points
  • Drift is the difference between managed definition and reality.
  • Manual changes and failed runs cause it.
  • Decide whether the system or the code is right.
Key checks
  • ansible-playbook site.yml --check --diff | grep -c changed — drift count
  • aide --check — file drift
  • Last manual login/change audit — causes
ReferenceWhy it matters1 section · depth on demand

In depth

Drift is the difference between a system's actual configuration and its desired configuration, usually caused by manual changes, partial deployments or another tool changing the same settings. Drift makes systems inconsistent and future automation unpredictable.

Drift sourceExample
Manual hotfixAdmin changes an ACL during an incident
Failed runHalf the hosts updated
Competing toolsGPO and Ansible both manage a setting
Vendor updatesUpgrade changes defaults

Decide per setting whether drift should be reverted automatically, reported for review, or accepted and written back into the desired state.

ReferenceImportant terms & boundaries1 section · depth on demand

Mechanics

Configuration Management → Drift is owned at runtime by the configuration-management controller/engine and per-target modules/resources converging declared state. Its durable intent is versioned desired-state definitions, inventory, variables, templates/modules and enforcement policy; the stable identity contract is definition revision, inventory target ID, resource/task identity and execution/run ID. The consumer-visible target is the managed host/service/file/package configuration and its consumer-visible behavior. The operating invariants are that desired state and target selection are explicit, repeated runs converge/no-op, variable precedence is reviewable, changes are reported and post-state is independently checked. Follow the chain of components source/inventory → variable/template resolution → module/resource evaluation → target mutation → convergence result → service/application read-back and record which layer currently owns truth. The linked authority for bounded mechanics is Ansible Documentation — Playbooks; documentation support is separate from observed lab/production Evidence.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docconfiguration-management automation current

Authoritative/upstream documentation reviewed for bounded claims in Configuration Management > Drift. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_intro.html · confidence 94%
Depth when you need it

Deep reference

Healthy vs suspicious evidence

Output interpretation

Capture at minimum definition revision, inventory host/object, task/resource, resolved variables, changed/no-op status, diff/error and final target/service state. For desired-versus-actual comparison, normalization, ignored/computed fields, drift ownership and safe convergence rather than blind Set/reapply, prefer typed fields and stable IDs over human presentation text.

Confirmation

Confirm action

Continue?