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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.