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