1ANSIBLE-INVENTORY(1)    System administration commands    ANSIBLE-INVENTORY(1)
2
3
4

NAME

6       ansible-inventory - None
7

SYNOPSIS

9       usage: ansible-inventory [-h] [--version] [-v] [-i INVENTORY]
10              [--vault-id VAULT_IDS] [--ask-vault-pass | --vault-password-file
11              VAULT_PASSWORD_FILES] [--playbook-dir BASEDIR] [--list]  [--host
12              HOST] [--graph] [-y] [--toml] [--vars] [--export] [--output OUT‐
13              PUT_FILE] [host|group]
14

DESCRIPTION

16       used to display or dump the configured inventory as Ansible sees it
17

COMMON OPTIONS

19          None
20
21       --ask-vault-pass
22          ask for vault password
23
24       --export
25          When doing an --list, represent in a way that is optimized  for  ex‐
26          port,not  as an accurate representation of how Ansible has processed
27          it
28
29       --graph
30          create inventory graph, if supplying pattern  it  must  be  a  valid
31          group name
32
33       --host 'HOST'
34          Output specific host info, works as inventory script
35
36       --list
37          Output all hosts info, works as inventory script
38
39       --list-hosts
40          ==SUPPRESS==
41
42       --output 'OUTPUT_FILE'
43          When  doing  --list,  send the inventory to a file instead of to the
44          screen
45
46       --playbook-dir 'BASEDIR'
47          Since this tool does not use playbooks, use  this  as  a  substitute
48          playbook directory.This sets the relative path for many features in‐
49          cluding roles/ group_vars/ etc.
50
51       --toml
52          Use TOML format instead of default JSON, ignored for --graph
53
54       --vars
55          Add vars to graph display, ignored unless used with --graph
56
57       --vault-id
58          the vault identity to use
59
60       --vault-password-file
61          vault password file
62
63       --version
64          show program's version number, config file location, configured mod‐
65          ule search path, module location, executable location and exit
66
67       -h, --help
68          show this help message and exit
69
70       -i, --inventory, --inventory-file
71          specify  inventory  host path or comma separated host list. --inven‐
72          tory-file is deprecated
73
74       -l, --limit
75          ==SUPPRESS==
76
77       -v, --verbose
78          verbose mode (-vvv for more, -vvvv to enable connection debugging)
79
80       -y, --yaml
81          Use YAML format instead of default JSON, ignored for --graph
82

ENVIRONMENT

84       The following environment variables may be specified.
85
86       ANSIBLE_CONFIG -- Specify override location for the ansible config file
87
88       Many more are available for most options in ansible.cfg
89
90       For a full list  check  https://docs.ansible.com/.  or  use  the  ansi‐
91       ble-config command.
92

FILES

94       /etc/ansible/ansible.cfg -- Config file, used if present
95
96       ~/.ansible.cfg  --  User  config  file, overrides the default config if
97       present
98
99       ./ansible.cfg -- Local config file (in current working  directory)  as‐
100       sumed to be 'project specific' and overrides the rest if present.
101
102       As  mentioned above, the ANSIBLE_CONFIG environment variable will over‐
103       ride all others.
104

AUTHOR

106       Ansible was originally written by Michael DeHaan.
107
109       Copyright © 2018 Red Hat, Inc | Ansible.  Ansible is released under the
110       terms of the GPLv3 license.
111

SEE ALSO

113       ansible  (1), ansible-config (1), ansible-console (1), ansible-doc (1),
114       ansible-galaxy  (1),  ansible-playbook  (1),  ansible-pull  (1),  ansi‐
115       ble-vault (1)
116
117       Extensive  documentation  is  available  in  the documentation site: <‐
118       https://docs.ansible.com>.  IRC and mailing list info can be  found  in
119       file          CONTRIBUTING.md,         available         in:         <‐
120       https://github.com/ansible/ansible>
121
122
123
124
125Ansible 2.9.21                                            ANSIBLE-INVENTORY(1)
Impressum