But a definition is essentially a parameterized recipe template (macro). Not an abstraction. That's why I talked about resources and providers being an abstraction, but talked about definitions being merely a grouping of related resource declarations.An example of something suited to be a definition would be: the apache_conf definition in the apache2 cookbook. The right level of abstraction for this particular case is to call a procedure (macro) that simply declares another resource with some predefined attributes and some other parameterized attributes. Every apache config file change needs to trigger a reload or restart of the service, and there may be many such config files, so wrapping that up in a definition (macro) is useful.
Archive powered by MHonArc 2.6.16.