website: validate command docs

This commit is contained in:
Mitchell Hashimoto 2013-06-20 14:13:35 -07:00
parent f1f0e02031
commit e1985e7f6e
2 changed files with 27 additions and 1 deletions

View File

@ -0,0 +1,26 @@
---
layout: "docs"
---
# Command-Line: Validate
The `packer validate` command is used to validate the syntax and configuration
of a [template](/docs/templates/introduction.html). The command will return
a zero exit status on success, and a non-zero exit status on failure. Additionally,
if a template doesn't validate, any error messages will be outputted.
Example usage:
```
$ packer validate my-template.json
Template validation failed. Errors are shown below.
Errors validating build 'vmware'. 1 error(s) occurred:
* Either a path or inline script must be specified.
```
## Options
* `-syntax-only` - Only the syntax of the template is checked. The configuration
is not validated.

View File

@ -33,7 +33,7 @@
<li class="nav-header">Command-Line</li>
<li><a href="/docs/command-line/introduction.html">Introduction</a></li>
<li><a href="#">Build</a></li>
<li><a href="#">Validate</a></li>
<li><a href="/docs/command-line/validate.html">Validate</a></li>
<li class="nav-header">Templates</li>
<li><a href="/docs/templates/introduction.html">Introduction</a></li>