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-password  |  --vault-pass‐
11              word-file VAULT_PASSWORD_FILES] [--playbook-dir BASEDIR] [-e EX‐
12              TRA_VARS]   [--list]   [--host  HOST]  [--graph]  [-y]  [--toml]
13              [--vars] [--export] [--output OUTPUT_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-password, --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
49          including 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, --vault-pass-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       -e, --extra-vars
68          set  additional  variables  as  key=value  or YAML/JSON, if filename
69          prepend with @
70
71       -h, --help
72          show this help message and exit
73
74       -i, --inventory, --inventory-file
75          specify inventory host path or comma separated host  list.  --inven‐
76          tory-file is deprecated
77
78       -l, --limit
79          ==SUPPRESS==
80
81       -v, --verbose
82          Causes Ansible to print more debug messages. Adding multiple -v will
83          increase the verbosity, the builtin plugins currently evaluate up to
84          -vvvvvv.  A  reasonable level to start is -vvv, connection debugging
85          might require -vvvv.
86
87       -y, --yaml
88          Use YAML format instead of default JSON, ignored for --graph
89

ENVIRONMENT

91       The following environment variables may be specified.
92
93       ANSIBLE_CONFIG -- Specify override location for the ansible config file
94
95       Many more are available for most options in ansible.cfg
96
97       For a full list  check  https://docs.ansible.com/.  or  use  the  ansi‐
98       ble-config command.
99

FILES

101       /etc/ansible/ansible.cfg -- Config file, used if present
102
103       ~/.ansible.cfg  --  User  config  file, overrides the default config if
104       present
105
106       ./ansible.cfg -- Local config file (in current working  directory)  as‐
107       sumed to be 'project specific' and overrides the rest if present.
108
109       As  mentioned above, the ANSIBLE_CONFIG environment variable will over‐
110       ride all others.
111

AUTHOR

113       Ansible was originally written by Michael DeHaan.
114
116       Copyright © 2018 Red Hat, Inc | Ansible.  Ansible is released under the
117       terms of the GPLv3 license.
118

SEE ALSO

120       ansible  (1), ansible-config (1), ansible-console (1), ansible-doc (1),
121       ansible-galaxy  (1),  ansible-playbook  (1),  ansible-pull  (1),  ansi‐
122       ble-vault (1)
123
124       Extensive  documentation  is  available  in  the documentation site: <‐
125       https://docs.ansible.com>.  IRC and mailing list info can be  found  in
126       file          CONTRIBUTING.md,         available         in:         <‐
127       https://github.com/ansible/ansible>
128
129
130
131
132Ansible 2.14.1                                            ANSIBLE-INVENTORY(1)
Impressum