- From: Peter Donald <
>
- To:
- Subject: [chef] Re: updated_by_last action from a resource inside a LWP
- Date: Mon, 16 Jul 2012 11:05:54 +1000
Hi,
On Mon, Jul 16, 2012 at 6:06 AM,
<
>
wrote:
>
If I have a lightweight provider that is calling other resources, and I'd
>
like
>
to know if the resource I called modified anything, so that I can pass that
>
information along... is there a way to do that?
>
>
E.G.
>
>
If I am calling the template resource inside my own custom provider, is
>
there a
>
way to determine if it has called updated_by_last_action so that I can then
>
call updated_by_last_action on my new_resource?
Unfortunately you have hit one of the biggest pain points I have found
with Chef. There is no way I have found to do this as they are
separate run contexts. I have tried all sorts of hackery to try to get
this working but I don't think it is possible without monkey patching
the core ... which I have yet to get to. It does mean that resources
are not composable but mostly they are still a better option than
definitions. It would be nice to have some way to be able to notify
the containing resource when things have changed.
--
Cheers,
Peter Donald
Archive powered by MHonArc 2.6.16.