Options (2)
-i, --inventory-filebooleanDisplay a custom inventory
Example:
ansible-inventory --list {{[-i|--inventory-file]}} {{path/to/file_or_script_or_directory}}-y, --yamlbooleanDisplay the default inventory in YAML
Example:
ansible-inventory --list {{[-y|--yaml]}}Examples (4)
Display the default inventory
ansible-inventory --listDisplay a custom inventory
ansible-inventory --list [-i|--inventory-file] path/to/file_or_script_or_directoryDisplay the default inventory in YAML
ansible-inventory --list [-y|--yaml]Dump the default inventory to a file
ansible-inventory --list --output path/to/filemade by @shridhargupta | data from tldr-pages