Inventory Problems
Cheat sheet · https://pcornel.dk/topic.php?topic=6056
Answer
Inventory Problems isolates wrong, missing, duplicate or stale automation targets and target metadata before execution fans out to unintended hosts, devices, groups or environments.
Remember
- Inventory parsed ≠ intended targets selected.
- Host reachable ≠ host belongs in this change scope.
- Same hostname label ≠ same physical/logical target.
- Dynamic inventory refresh succeeded ≠ source data is current or semantically correct.
First checks
ansible-inventory --graph— structureansible-inventory --host <h>— vars- SoT records for missing hosts — source data
Verify in this order
SoT → inventory plugin → hosts/groups
Where it usually breaks
Inventory correctness can be proven only against a defined intended target set and source snapshot; reachability or successful parsing does not prove membership is right.
Inventory/vars → play/task selection → connection/become → module request → module result → target object read-back → handler/service effective state → workload verification.
Inventory Problems troubleshooting proof-boundary map
| Boundary | Healthy evidence | Suspicious evidence |
|---|---|---|
| Symptom / scope | Time window, immutable source/run identity, effective inputs and exact targets are explicit | Floating source, changed inputs or ambiguous targets destroy reproducibility |
| First failed boundary | Transport/auth/dependency/render/operation evidence identifies the earliest divergence | Investigation starts at the final error and skips earlier unproven boundaries |
| Effective outcome | Controller result is paired with target read-back and workload/service acceptance | Green execution state or changed symptom substitutes for effective-state verification |
| Recovery / closure | Minimal change restores the original test and regression/partial-state checks are clean | Broad retry or unrelated edits make the incident non-reproducible and hide residual state |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=6056