github.com/mmcquillan/packer@v1.1.1-0.20171009221028-c85cf0483a5d/website/source/docs/commands/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: 'packer validate - Commands' 9 sidebar_current: 'docs-commands-validate' 10 --- 11 12 # `validate` Command 13 14 The `packer validate` Packer command is used to validate the syntax and 15 configuration of a [template](/docs/templates/index.html). The command 16 will return a zero exit status on success, and a non-zero exit status on 17 failure. Additionally, if a template doesn't validate, any error messages will 18 be outputted. 19 20 Example usage: 21 22 ``` text 23 $ packer validate my-template.json 24 Template validation failed. Errors are shown below. 25 26 Errors validating build 'vmware'. 1 error(s) occurred: 27 28 * Either a path or inline script must be specified. 29 ``` 30 31 ## Options 32 33 - `-syntax-only` - Only the syntax of the template is checked. The configuration 34 is not validated.