Pcornel
Automation

Inventory

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

Back to the Topic

Answer

Inventory is the list of systems automation manages, with groups and variables such as addresses, roles and platforms, kept statically in files or generated dynamically from a CMDB, cloud or NetBox.

Remember

  • Generate inventory from a source of truth when possible.
  • Groups and variables tailor behaviour.
  • Unreachable hosts must be visible, not silently skipped.

First checks

  • ansible-inventory --graph — groups
  • Inventory source (SoT) — authority
  • Validation (all hosts reachable, required vars) — quality

Verify in this order

SoT → inventory → automation

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=5840

Confirmation

Confirm action

Continue?