Syntax errors

Syntax errors are the most common errors that we see when we develop code. It's easy to miss simple syntax when typing code, and to push failing code to a test environment. In the following example, the closing bracket to the class at the end of the file is missing:

[root@wordpress puppet]# puppet agent -tInfo: Using configured environment 'production'Info: Retrieving pluginfactsInfo: Retrieving pluginInfo: Retrieving localesInfo: Loading factsError: Could not retrieve catalog from remote server: Error 500 on SERVER:
 Server Error: Syntax error at end of input (file: /etc/puppetlabs/code/environments/production/modules/profile/manifests/baseline.pp) on node wordpress

We can test for this failure long before it is deployed ...

Get Mastering Puppet 5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.