Configuration

Dependencies


Dependencies between resources can be implicit or explicit.

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" },
]