Pcornel
Browse topics
Options
Recent
Favorites
Automation · Technical reference

Configuration Management Troubleshooting

Direct answer

Troubleshoot configuration management by running in check or verbose mode, reading which resource or task failed, checking variable precedence, facts and inventory, and connectivity and privileges on the target.

When to use this

Use this when configuration management runs fail or give wrong results.

First 30 seconds

1. Failures: connectivity, privilege, missing facts, template errors, module args.

2. Run verbose on one host.

3. Check vars precedence.

4. Read module return values.

5. Fix and add tests.

Operational verification

controller → host → task → module → error

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. · Ansible
Key commandansible-inventory --list
Scope / prerequisiteUse this when configuration management runs fail or give wrong results.
Reference · 1
What next?3 suggested next steps
Catalog command links1
Evidence0
On this pageJump to a specific section
Automation command reference

Primary Commands

Configuration and operational commands for this Topic.

Operational workflow

Verification & Troubleshooting

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

5 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 Close configuration management with read-back and a no-op rerun Verify boundary

After remediation, read the authoritative target configuration from the managed node and verify the runtime consumer has loaded the intended value. Repeat the original service or workload test from the original context, then run the same configuration-management operation again and expect a no-op or an explicitly understood stable result. Correlate controller output with target-side logs or state when the apply path is asynchronous. A successful controller task shows execution at the automation layer; it does not by itself show that the target converged or that the application now behaves correctly.

Step 2 Command read-back and what it shows Verify boundary

Known-good is the intended host appears once with the expected groups/variables and the original play reaches a changed-or-ok result that leaves the target in the declared state; broken state is the host is missing/duplicated, variables resolve to an unexpected value, or the play still reports unreachable/failed after inventory resolution is correct. Inventory output shows controller-side target resolution only; it cannot show transport, module execution or final service health.

Step 3 Separate render, delivery, apply and convergence failures Narrow the fault

If the intended value is absent from the rendered candidate, branch into variable precedence, inventory, template or policy selection before testing transport. If the candidate is correct but never reaches the target, inspect authentication, connectivity, agent health, locks and task results. If the target file or datastore changes but runtime behavior stays old, identify the service reload, daemon restart, reconciliation loop or cache that owns effective state. If every run reports a new change, compare normalized before/after state for unstable ordering, timestamps, defaults or non-idempotent actions instead of treating repeated “changed” status as harmless.

Step 4 Common mistakes Narrow the fault
  • Not checking which run last changed a resource.
Step 5 Observation-driven branch and next-check logic Narrow the fault

If the expected host is absent or grouped incorrectly, inspect inventory sources and group precedence; if the host exists but connection data is wrong, compare resolved hostvars and transport credentials; if inventory and connection are correct but tasks fail, move to module output, privilege escalation and target-side state.

Key points
  • Check mode shows what would change.
  • Variable precedence explains wrong values.
  • Facts may be stale.
Key checks
  • ansible-playbook site.yml -vvv --limit <host> — verbose
  • ansible <host> -m setup — facts
  • ansible-playbook site.yml --start-at-task '<task>' — resume
ReferenceWhy it matters1 section · depth on demand

Configuration convergence has more than one state

Configuration Management troubleshooting must distinguish desired source, rendered candidate, transport or agent execution, persisted target configuration and effective runtime state. A controller can report a successful task while the target later rejects a reload, keeps an old generated file, is overridden by a higher-precedence source or has not restarted the consuming service. Idempotency is another observable boundary: a second run against a converged target should normally produce no unintended delta. Treat controller result, target read-back and workload behavior as separate facts rather than collapsing them into one green job status.

ReferenceHow it works1 section · depth on demand

How it works

Configuration Management Troubleshooting is governed by inventory resolution, variable precedence, module execution and target convergence. The controller resolves hosts and group variables before a play reaches a managed node; connection plugins and privilege escalation then determine whether the declared task can execute against the intended host context. Inventory sources, credentials, transport reachability, Python/module support and the managed service are separate things to check. The important state separation is that an inventory entry can be syntactically valid while resolving the wrong host or variables, and a successful connection can coexist with a task that never converges the target state.

ReferenceImportant terms & boundaries1 section · depth on demand

Method

Configuration management troubleshooting isolates whether the definition, the data, the connection or the target is wrong.

1. Rerun on one host with verbose output (-vvv, --debug).

2. Check which variables the host actually got (ansible-inventory --host h, Hiera lookups).

3. Check connectivity and privilege escalation.

4. Check the target: package repos, file permissions, service manager.

5. Run twice: if the second run still changes things, the task is not idempotent.

SymptomLikely cause
Wrong value appliedVariable precedence
Always "changed"Non-idempotent command/template ordering
Works on some hostsDifferent OS versions or facts
Change reverted laterAnother tool or GPO manages the same setting
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 > Configuration Management Troubleshooting. 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%
Confirmation

Confirm action

Continue?