Validate your manifest with puppet parser validate

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

  1. Check your syntax by entering puppet parser validate c:\myfiles\file.pp in the Puppet command prompt. If a manifest has no syntax errors, the tool outputs nothing.
  2. To see what output occurs when there is an error, temporarily edit the manifest and remove the : after the resource title. Run puppet parser validate c:\myfiles\file.pp again, and see the following output:
    Error: Could not parse for environment production: Syntax error at 'ensure' at c:/myfiles/file.pp:2:3