Skip to Content
Learning Puppet 4
book

Learning Puppet 4

by Jo Rhett
April 2016
Intermediate to advanced content levelIntermediate to advanced
594 pages
12h 53m
English
O'Reilly Media, Inc.
Content preview from Learning Puppet 4

Chapter 9. Wrap-Up of Puppet Basics

In this part, you’ve created a safe, risk-free learning environment you can utilize to write and test Puppet manifests. You’ve learned the following things about Puppet:

  • Puppet policies are written in manifests.
  • Manifests contain one or more resource declarations.
  • Resources create, alter, or remove their types: user, group, file, and so on.
  • Facter provides data about the node useful for local customization.

You have learned each part of the Puppet configuration language and how to utilize it to create manifests. You’ve used Puppet to apply the manifest on your test system. puppet apply does the following:

  • Parses a manifest file and reports any errors.
  • Utilizes facts about the system as variables for customization.
  • Executes immediately on the local system.
  • Provides verbose output informing you of what it has done.
Tip
While many people utilize puppet apply only for testing manifest changes, it can be used at broad scale if a method of synchronizing manifests to each node is available. We’ll discuss the pros and cons of this approach in Part IV.

Best Practices for Writing Manifests

Before moving on to the next chapter, I’d like to remind you of best practices for writing Puppet manifests:

  • Quote all unquoted string values.
  • ensure should be the first attribute in a resource block.
  • Align the arrows for attributes within a resource block.
  • Enable the strict_variables configuration setting to catch errors while testing.
  • Group resources by their ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Pro Puppet, Second Edition

Pro Puppet, Second Edition

Spencer Krum, William Van Hevelingen, Ben Kero, James Turnbull, Jeffery McCune
Mastering Puppet 5

Mastering Puppet 5

Ryan Russell-Yates, Jason Southgate

Publisher Resources

ISBN: 9781491907993Purchase bookErrata Page