nornir.plugins.inventory.__init__
- class nornir.plugins.inventory.__init__.SimpleInventory(host_file: str = 'hosts.yaml', group_file: str = 'groups.yaml', defaults_file: str = 'defaults.yaml', encoding: str = 'utf-8')
- load() Inventory
Build the inventory from the YAML files given to the constructor.
Only the hosts file is required. A missing groups or defaults file is skipped, and a file that is empty or holds nothing but comments is treated as empty and logged as a warning. The group names the hosts refer to are resolved into the group objects themselves, so a name that is not in the groups file is an error.
- Returns:
The inventory the files describe.
- Return type: