.\" Man page generated from reStructuredText.
.
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "ANSIBLE-INVENTORY" "1" "" "Ansible 2.16.6" "System administration commands"
.SH NAME
ansible-inventory \- Show Ansible inventory information, by default it uses the inventory script JSON format
.SH SYNOPSIS
.INDENT 0.0
.TP
.B usage: ansible\-inventory [\-h] [\-\-version] [\-v] [\-i INVENTORY] [\-l SUBSET]
[\-\-vault\-id VAULT_IDS]
[\-J | \-\-vault\-password\-file VAULT_PASSWORD_FILES]
[\-\-playbook\-dir BASEDIR] [\-e EXTRA_VARS] [\-\-list]
[\-\-host HOST] [\-\-graph] [\-y] [\-\-toml] [\-\-vars]
[\-\-export] [\-\-output OUTPUT_FILE]
[host|group]
.UNINDENT
.SH DESCRIPTION
.sp
used to display or dump the configured inventory as Ansible sees it
.SH COMMON OPTIONS
.INDENT 0.0
.INDENT 3.5
None
.UNINDENT
.UNINDENT
.sp
\fB\-\-export\fP
.INDENT 0.0
.INDENT 3.5
When doing an \-\-list, represent in a way that is optimized for export,not as an accurate representation of how Ansible has processed it
.UNINDENT
.UNINDENT
.sp
\fB\-\-graph\fP
.INDENT 0.0
.INDENT 3.5
create inventory graph, if supplying pattern it must be a valid group name. It will ignore limit
.UNINDENT
.UNINDENT
.sp
\fB\-\-host\fP \(aqHOST\(aq
.INDENT 0.0
.INDENT 3.5
Output specific host info, works as inventory script. It will ignore limit
.UNINDENT
.UNINDENT
.sp
\fB\-\-list\fP
.INDENT 0.0
.INDENT 3.5
Output all hosts info, works as inventory script
.UNINDENT
.UNINDENT
.sp
\fB\-\-output\fP \(aqOUTPUT_FILE\(aq
.INDENT 0.0
.INDENT 3.5
When doing \-\-list, send the inventory to a file instead of to the screen
.UNINDENT
.UNINDENT
.sp
\fB\-\-playbook\-dir\fP \(aqBASEDIR\(aq
.INDENT 0.0
.INDENT 3.5
Since this tool does not use playbooks, use this as a substitute playbook directory. This sets the relative path for many features including roles/ group_vars/ etc.
.UNINDENT
.UNINDENT
.sp
\fB\-\-toml\fP
.INDENT 0.0
.INDENT 3.5
Use TOML format instead of default JSON, ignored for \-\-graph
.UNINDENT
.UNINDENT
.sp
\fB\-\-vars\fP
.INDENT 0.0
.INDENT 3.5
Add vars to graph display, ignored unless used with \-\-graph
.UNINDENT
.UNINDENT
.sp
\fB\-\-vault\-id\fP
.INDENT 0.0
.INDENT 3.5
the vault identity to use. This argument may be specified multiple times.
.UNINDENT
.UNINDENT
.sp
\fB\-\-vault\-password\-file\fP, \fB\-\-vault\-pass\-file\fP
.INDENT 0.0
.INDENT 3.5
vault password file
.UNINDENT
.UNINDENT
.sp
\fB\-\-version\fP
.INDENT 0.0
.INDENT 3.5
show program\(aqs version number, config file location, configured module search path, module location, executable location and exit
.UNINDENT
.UNINDENT
.sp
\fB\-J\fP, \fB\-\-ask\-vault\-password\fP, \fB\-\-ask\-vault\-pass\fP
.INDENT 0.0
.INDENT 3.5
ask for vault password
.UNINDENT
.UNINDENT
.sp
\fB\-e\fP, \fB\-\-extra\-vars\fP
.INDENT 0.0
.INDENT 3.5
set additional variables as key=value or YAML/JSON, if filename prepend with @. This argument may be specified multiple times.
.UNINDENT
.UNINDENT
.sp
\fB\-h\fP, \fB\-\-help\fP
.INDENT 0.0
.INDENT 3.5
show this help message and exit
.UNINDENT
.UNINDENT
.sp
\fB\-i\fP, \fB\-\-inventory\fP, \fB\-\-inventory\-file\fP
.INDENT 0.0
.INDENT 3.5
specify inventory host path or comma separated host list. \-\-inventory\-file is deprecated. This argument may be specified multiple times.
.UNINDENT
.UNINDENT
.sp
\fB\-l\fP \(aqSUBSET\(aq, \fB\-\-limit\fP \(aqSUBSET\(aq
.INDENT 0.0
.INDENT 3.5
further limit selected hosts to an additional pattern
.UNINDENT
.UNINDENT
.sp
\fB\-v\fP, \fB\-\-verbose\fP
.INDENT 0.0
.INDENT 3.5
Causes Ansible to print more debug messages. Adding multiple \-v will increase the verbosity, the builtin plugins currently evaluate up to \-vvvvvv. A reasonable level to start is \-vvv, connection debugging might require \-vvvv. This argument may be specified multiple times.
.UNINDENT
.UNINDENT
.sp
\fB\-y\fP, \fB\-\-yaml\fP
.INDENT 0.0
.INDENT 3.5
Use YAML format instead of default JSON, ignored for \-\-graph
.UNINDENT
.UNINDENT
.SH ARGUMENTS
.sp
host
.sp
The name of a host to match in the inventory, relevant when using \-\-list
.sp
group
.sp
The name of a group in the inventory, relevant when using \-\-graph
.SH INVENTORY
.sp
Ansible stores the hosts it can potentially operate on in an inventory.
This can be an YAML file, ini\-like file, a script, directory, list, etc.
For additional options, see the documentation on \&.
.SH ENVIRONMENT
.sp
The following environment variables may be specified.
.sp
ANSIBLE_INVENTORY \-\- Override the default ansible inventory sources
.sp
ANSIBLE_CONFIG \-\- Specify override location for the ansible config file
.sp
Many more are available for most options in ansible.cfg
.sp
For a full list check \&. or use the \fIansible\-config\fP command.
.SH FILES
.sp
/etc/ansible/hosts \-\- Default inventory file
.sp
/etc/ansible/ansible.cfg \-\- Config file, used if present
.sp
~/.ansible.cfg \-\- User config file, overrides the default config if present
.sp
\&./ansible.cfg \-\- Local config file (in current working directory) assumed to be \(aqproject specific\(aq and overrides the rest if present.
.sp
As mentioned above, the ANSIBLE_CONFIG environment variable will override all others.
.SH AUTHOR
.sp
Ansible was originally written by Michael DeHaan.
.SH COPYRIGHT
.sp
Copyright © 2018 Red Hat, Inc | Ansible.
Ansible is released under the terms of the GPLv3 license.
.SH SEE ALSO
.sp
\fBansible\fP (1), \fBansible\-config\fP (1), \fBansible\-console\fP (1), \fBansible\-doc\fP (1), \fBansible\-galaxy\fP (1), \fBansible\-playbook\fP (1), \fBansible\-pull\fP (1), \fBansible\-vault\fP (1)
.sp
Extensive documentation is available in the documentation site:
< >.
IRC and mailing list info can be found in file CONTRIBUTING.md,
available in: < >
.\" Generated by docutils manpage writer.
.