Being one of the cornerstones of the Puppet model, resources were introduced quite early in Chapter 1, Writing Your First Manifests. Remember how each resource represents a piece of state on the agent system. It has a resource type, a name (or a title), and a list of attributes. An attribute can either be property
or parameter
. Between the two of them, properties represent distinct pieces of state, and parameters merely influence Puppet's actions upon the property
values.
Let's examine resource types in more detail and understand their inner workings. This is not only important when extending Puppet with resource types of your own (which will be demonstrated in Chapter 5, Extending Your Puppet Infrastructure with Modules). It also helps you anticipate the action that Puppet will take, given your manifest, and get a better understanding of both the master and the agent.
First, we take a closer look at the operational structure of Puppet, with its pieces and phases...