Pcornel
Automation · Automation Architecture

Inventory

Cheat sheet · https://pcornel.dk/topic.php?topic=5188

Back to the Topic

Answer

The inventory in automation architecture is the component that tells the platform which targets exist, how to reach them and which groups and variables apply.

Remember

  • Inventory lists hosts, groups and variables.
  • Generated from a source of truth ideally.
  • Stale inventory causes failures.

First checks

  • ansible-inventory --graph — inventory groups
  • ansible-inventory --list | jq '._meta.hostvars | length' — host count
  • Dynamic inventory source (NetBox/cloud) — source of truth

Verify in this order

source of truth → inventory → automation targets

Where it usually breaks

Inventory/vars → play/task selection → connection/become → module request → module result → target object read-back → handler/service effective state → workload verification.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5188

Confirmation

Confirm action

Continue?