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

NAME

6       ansible-inventory - None
7

SYNOPSIS

9       ansible-inventory [options] [host|group]
10

DESCRIPTION

12       used to display or dump the configured inventory as Ansible sees it
13

COMMON OPTIONS

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

ENVIRONMENT

72       The following environment variables may be specified.
73
74       ANSIBLE_CONFIG -- Specify override location for the ansible config file
75
76       Many more are available for most options in ansible.cfg
77
78       For  a  full  list  check  https://docs.ansible.com/.  or use the ansi‐
79       ble-config command.
80

FILES

82       /etc/ansible/ansible.cfg -- Config file, used if present
83
84       ~/.ansible.cfg -- User config file, overrides  the  default  config  if
85       present
86
87       ./ansible.cfg  --  Local  config  file  (in  current working directory)
88       assumed to be 'project specific' and overrides the rest if present.
89
90       As mentioned above, the ANSIBLE_CONFIG environment variable will  over‐
91       ride all others.
92

AUTHOR

94       Ansible was originally written by Michael DeHaan.
95
97       Copyright © 2018 Red Hat, Inc | Ansible.  Ansible is released under the
98       terms of the GPLv3 license.
99

SEE ALSO

101       ansible (1), ansible-config (1), ansible-console (1), ansible-doc  (1),
102       ansible-galaxy  (1),  ansible-playbook  (1),  ansible-pull  (1),  ansi‐
103       ble-vault (1)
104
105       Extensive documentation is available  in  the  documentation  site:  <‐
106       https://docs.ansible.com>.   IRC  and mailing list info can be found in
107       file         CONTRIBUTING.md,         available         in:          <‐
108       https://github.com/ansible/ansible>
109
110
111
112
113Ansible 2.8.1                                             ANSIBLE-INVENTORY(1)
Impressum