Relationships, Ordering, and Scope
In this chapter, we will be discussing relationships, ordering, and scope in Puppet. These topics are often considered complicated because Puppet’s approach differs greatly from traditional languages. However, we will show you how to manage these aspects effectively and avoid unnecessary complexities.
We will start by discussing Puppet’s approach to relationships and ordering. By default, Puppet treats resources as independent and can apply them in any order in the catalog. However, where ordering is necessary, we will show you how to use metaparameters such as before
, after
, notify
, and subscribe
to enforce ordering and create relationships between resources.
After that, we will cover the concept of containment. We will explain that including classes are not contained within their calling classes, so relationships/dependencies made between classes do not automatically create relationships and dependencies with the resources in...