Summary

In this chapter, we've looked at a range of different ways of organizing your Puppet code. We've covered classes in detail, explaining how to define them using the class keyword to define a new class, using the include keyword to declare the class, and using Hiera's automatic parameter lookup mechanism to supply parameters for included classes.

Declaring parameters involves specifying the allowable data types for parameters, and we've had a brief overview of Puppet's data types, including scalars, collections, content types and range parameters, abstract types, flexible types, and introduced creating your own type aliases. We've also introduced the defined resource type, and explained the difference between defined resource types and classes, ...

Get Puppet 5 Beginner's Guide - Third Edition 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.