Configuration
Dependencies
Dependencies between resources can be implicit or explicit.
- implicit dependencies between resources are established by pullconfd according to certain internal rules. For instance, a directory resource depends implicitly on other directory resources if they happen to be a parent node to this directory within the filesystem. There is a section in each resource documentation page that describes the kind of implicit dependency relationships this resource establishes with other resources. Implicit dependencies are established without specific configuration by the user.
- explicit dependencies go beyond implicit dependencies in cases where implicit dependencies do not suffice. They are configured via the
requires
meta-parameter in each resource (see also Resources).
Explicit dependencies are validated with additional care to avoid dependency loops. Explicit dependencies may also produce other errors during validation if a dependency between two resources cannot be established in a logical sense. For example a directory resource at /my/example
cannot depend on another directory resource at /my/example/further/down
, because the former must be processed before the latter.
To define a dependency using the requires
parameter, use the primary parameter of the respective resource as well as their type
.
Not every resource has a primary parameter (e.g. resolv.conf), because some resources can only appear once within the entire resource catalog of a client. However most resources are primarily identified by some parameter, e.g. directory is primarily identified by their path
parameter.
Examples
[[resources]]
type = "directory"
path = "/my/elaborate/example"
requires = [
{ type = "file", path = "/totally/different/location" },
{ type = "resolv.conf" },
{ type = "host", ip-address = "127.0.0.1" },
]