github.com/rahart/packer@v0.12.2-0.20161229105310-282bb6ad370f/website/source/docs/command-line/validate.html.md (about) 1 --- 2 description: | 3 The `packer validate` Packer command is used to validate the syntax and 4 configuration of a template. The command will return a zero exit status on 5 success, and a non-zero exit status on failure. Additionally, if a template 6 doesn't validate, any error messages will be outputted. 7 layout: docs 8 page_title: 'Validate - Command-Line' 9 ... 10 11 # Command-Line: Validate 12 13 The `packer validate` Packer command is used to validate the syntax and 14 configuration of a [template](/docs/templates/introduction.html). The command 15 will return a zero exit status on success, and a non-zero exit status on 16 failure. Additionally, if a template doesn't validate, any error messages will 17 be outputted. 18 19 Example usage: 20 21 ``` {.text} 22 $ packer validate my-template.json 23 Template validation failed. Errors are shown below. 24 25 Errors validating build 'vmware'. 1 error(s) occurred: 26 27 * Either a path or inline script must be specified. 28 ``` 29 30 ## Options 31 32 - `-syntax-only` - Only the syntax of the template is checked. The 33 configuration is not validated.