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 use the class keyword to define a new class, use the include keyword to declare the class without parameters, and use the class keyword with a different syntax to declare the class with parameters.
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, range parameters, abstract types, and flexible types. We've seen how to separate your code from your configuration data by supplying module parameters in Hiera and using Puppet's automatic parameter lookup mechanism.
We've ...
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.
Read now
Unlock full access