Inventory Schema
This is the v1 YAML inventory contract.
Supported Top-Level Sections
defaults:
groups:
hosts:
Unsupported top-level sections fail validation.
Defaults
defaults:
transport: psrp
credential: prod-admin
Supported fields:
transportcredential
Groups
groups:
web:
vars:
transport: psrp
credential: web-admin
hosts:
- WEB01
- WEB02
children:
- web_canary
Supported group fields:
varshostschildren
Supported vars fields:
transportcredential
Hosts
Mapping form:
hosts:
SERVER01:
transport: winrm
credential: domain-admin
SERVER02:
List form:
hosts:
- SERVER01
- SERVER02
Inline list form:
hosts: [SERVER01, SERVER02]
Precedence
Transport selection:
- Explicit CLI
--transportwhen notauto. - Job transport when running
apply, when notauto. - Host inventory transport.
- Inherited group transport.
- Inventory defaults transport.
- Global config default transport.
- Built-in default.
Credential reference selection:
- CLI
--credential. - Job credential.
- Host credential.
- Inherited group credential.
- Inventory defaults credential.
- No credential.
Valid Example
defaults:
transport: psrp
credential: prod-admin
groups:
kiosks:
vars:
credential: helpdesk-local
hosts: [KIOSK01, KIOSK02]
hosts:
SERVER01:
transport: winrm
Invalid Examples
Plaintext secrets are invalid:
hosts:
PC001:
password: bad
Unsupported fields are invalid:
groups:
web:
vars_files:
- web.yml
Validation Behavior
Inventory validation fails before endpoint work starts. Errors should name the unsupported section, unsupported field, invalid type, unresolved selector, conflicting inherited metadata, or rejected secret-like key.