ansible-inventory
Display or dump an Ansible inventory. tldr-pages
On several platforms
Several platforms
Display the default inventory
ansible-inventory --listIdentifyDisplay a custom inventory
ansible-inventory --list --inventory-file path/to/file_or_script_or_directoryIdentifyDisplay the default inventory in YAML
ansible-inventory --list --yamlIdentifyDump the default inventory to a file
ansible-inventory --list --output path/to/fileIdentify