2022-07-24 17:13:13 +02:00
|
|
|
# ansible-inventory
|
|
|
|
|
|
|
|
> Display or dump an Ansible inventory.
|
|
|
|
> Voir aussi : `ansible`.
|
|
|
|
> Plus d'informations : <https://docs.ansible.com/ansible/latest/cli/ansible-inventory.html>.
|
|
|
|
|
|
|
|
- Affiche l'inventaire par défaut :
|
|
|
|
|
|
|
|
`ansible-inventory --list`
|
|
|
|
|
|
|
|
- Affiche un inventaire spécifique :
|
|
|
|
|
2025-06-04 19:18:01 +02:00
|
|
|
`ansible-inventory --list {{[-i|--inventory-file]}} {{chemin/vers/fichier_ou_script_ou_dossier}}`
|
2022-07-24 17:13:13 +02:00
|
|
|
|
|
|
|
- Affiche l'inventaire par défaut en YAML :
|
|
|
|
|
2025-06-04 19:18:01 +02:00
|
|
|
`ansible-inventory --list {{[-y|--yaml]}}`
|
2022-07-24 17:13:13 +02:00
|
|
|
|
|
|
|
- Sauvegarde l'inventaire par défaut dans un fichier :
|
|
|
|
|
|
|
|
`ansible-inventory --list --output {{chemin/vers/fichier}}`
|