website: document the inspect command
This commit is contained in:
parent
f36d5f3550
commit
ae3fdaea9b
|
@ -0,0 +1,44 @@
|
||||||
|
---
|
||||||
|
layout: "docs"
|
||||||
|
page_title: "Inspect - Command-Line"
|
||||||
|
---
|
||||||
|
|
||||||
|
# Command-Line: Inspect
|
||||||
|
|
||||||
|
The `packer inspect` command takes a template and outputs the various components
|
||||||
|
a template defines. This can help you quickly learn about a template without
|
||||||
|
having to dive into the JSON itself.
|
||||||
|
The command will tell you things like what variables a template accepts,
|
||||||
|
the builders it defines, the provisioners it defines and the order they'll
|
||||||
|
run, and more.
|
||||||
|
|
||||||
|
This command is extra useful when used with
|
||||||
|
[machine-readable output](/docs/command-line/machine-readable.html) enabled.
|
||||||
|
The command outputs the components in a way that is parseable by machines.
|
||||||
|
|
||||||
|
The command doesn't validate the actual configuration of the various
|
||||||
|
components (that is what the `validate` command is for), but it will
|
||||||
|
validate the syntax of your template by necessity.
|
||||||
|
|
||||||
|
## Usage Example
|
||||||
|
|
||||||
|
Given a basic template, here is an example of what the output might
|
||||||
|
look like:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ packer inspect template.json
|
||||||
|
Variables and their defaults:
|
||||||
|
|
||||||
|
aws_access_key =
|
||||||
|
aws_secret_key =
|
||||||
|
|
||||||
|
Builders:
|
||||||
|
|
||||||
|
amazon-ebs
|
||||||
|
amazon-instance
|
||||||
|
virtualbox
|
||||||
|
|
||||||
|
Provisioners:
|
||||||
|
|
||||||
|
shell
|
||||||
|
```
|
|
@ -12,6 +12,7 @@
|
||||||
<li><a href="/docs/command-line/introduction.html">Introduction</a></li>
|
<li><a href="/docs/command-line/introduction.html">Introduction</a></li>
|
||||||
<li><a href="/docs/command-line/build.html">Build</a></li>
|
<li><a href="/docs/command-line/build.html">Build</a></li>
|
||||||
<li><a href="/docs/command-line/fix.html">Fix</a></li>
|
<li><a href="/docs/command-line/fix.html">Fix</a></li>
|
||||||
|
<li><a href="/docs/command-line/inspect.html">Inspect</a></li>
|
||||||
<li><a href="/docs/command-line/validate.html">Validate</a></li>
|
<li><a href="/docs/command-line/validate.html">Validate</a></li>
|
||||||
<li><a href="/docs/command-line/machine-readable.html">Machine-Readable Output</a></li>
|
<li><a href="/docs/command-line/machine-readable.html">Machine-Readable Output</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
Loading…
Reference in New Issue