1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/ansible-inventory.md

22 lines
542 B
Markdown
Raw Normal View History

2021-04-15 21:47:12 -04:00
# ansible-inventory
> Display or dump an Ansible inventory.
> See also: `ansible`.
> More information: <https://docs.ansible.com/ansible/latest/cli/ansible-inventory.html>.
- Display the default inventory:
`ansible-inventory --list`
- Display a custom inventory:
`ansible-inventory --list {{[-i|--inventory-file]}} {{path/to/file_or_script_or_directory}}`
2021-04-15 21:47:12 -04:00
- Display the default inventory in YAML:
`ansible-inventory --list {{[-y|--yaml]}}`
2021-04-15 21:47:12 -04:00
- Dump the default inventory to a file:
`ansible-inventory --list --output {{path/to/file}}`