O'Reilly logo

Troubleshooting Puppet by Thomas Uphill

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2. Writing Puppet Manifests

Puppet code is organized in manifests. In this chapter, we will cover how to write code in a way that reduces problems. We'll look at how one can configure editors to automatically correct code and keep it in style. Then, we'll look at how we can use tools to check the code for errors. Finally, we'll see how to use Git and Vagrant to automate the testing of our code.

Writing code

The Puppet style guide (for more information, visit https://docs.puppetlabs.com/guides/style_guide.html) was developed to define a common way of writing code that reduces errors. The style guide makes several suggestions to make your code more readable and consistent.

A common syntax error is to forget a comma between the attributes of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required