I’m starting to use LWRPs as simple containers for multiple
"first-class" resources. This is, I understand from the recent Chef
training in Ghent and a few online references, the currently suggested
method for aggregating resources with a level of isolation between the
recipe and the invoked resources.
One things I don’t think I’ve seen any firm documentation on is
notifications - one of the reasons LWRPs are suggested over and above
Definitions. More specifically, notifications from the contained
resources to their container LWRP and up the hierarchy.
I know that, near the end of the LWRP action definition, I’m supposed
to set new_resource.updated_by_last_action(boolean). But how do I what
to set if I’m simply containing, say, a pair of templates? I don’t
want the recipe that contains the LWRP itself to have to break
isolation and use any knowledge about the contained resource, and I
think I’m right to try and keep them separate.
I suppose I need the boolean OR of each of the contained resource’s
updated_by_last_action? calls, but I don’t /have/ a reference to each
resource. Unless I look inside and start manipulating the resources()
collection - and that seems a little low-level for what’s touted as a
higher-level interface to custom Resources and Providers.
Any thoughts? Have I missed something obvious?