Validate your manifest with puppet parser validate

You can validate that a manifest's syntax is correct by using the puppet parser validate command.

  1. Open the Puppet command prompt and check your syntax by running: puppet parser validate c:\myfiles\file.pp

    If the manifest has no syntax errors, the tool outputs nothing.

  2. To preview the error output, edit your sample manifest file to remove the : after the resource title, and run puppet parser validate c:\myfiles\file.pp again to return the error response:
    Error: Could not parse for environment production: Syntax error at 'ensure' at c:/myfiles/file.pp:2:3