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 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, --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          verbose mode (-vvv for more, -vvvv to enable connection debugging)
83
84       -y, --yaml
85          Use YAML format instead of default JSON, ignored for --graph
86

ENVIRONMENT

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

FILES

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

AUTHOR

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

SEE ALSO

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