How to Resolve a Puppet Error About Unclosed Quotes

Problem scenario
When running "puppet agent -t" on a Windows server with Puppet Agent installed and configured, you get an error like this:  "Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Unclosed quote after """ followed by ..."

For the relevant manifest, verify there are no unclosed quotes.  Then verify that you are using double backslashes in any path with a backslash "\".  For example, here are paths that may look unusual, but they are correct in a .pp file:
file { 'c:\\temp\\contint.txt':
exec { 'action':
      path => 'c:\\temp\\fun.txt'

Root cause 
Windows can use backslashes as escape characters.  So the parsing of backslashes can cause confusion for Puppet running on Windows.

Leave a comment

Your email address will not be published. Required fields are marked *