- From: <
>
- To:
- Subject: [chef] Re: Re: Re: updated_by_last action from a resource inside a LWP
- Date: Mon, 16 Jul 2012 08:30:38 -0700 (PDT)
yfeldblum pointed me to a great pattern for dealing with this. Here is the
gist
https://gist.github.com/d85be145f3ff824ccc07/0e97d44f20ec65411b141cb46cbeb19bb34b44ad
The general idea is you cache your current run_context, create a new one,
blank
out the resource collection, perform all your resource actions. Then you
restore the run_context back to the original and converge on the new run
context you created. This sub run context contains the subset of resources
acted upon in your provider. Then you call converge on the sub run context
and
check each of its resources to see if they were updated. If any did get
updated you pass that along to your new_resource.
Awesome and nifty. I implemented in my redisio cookbook in the install
provider and it seems to work great.
- [chef] Re: Re: Re: updated_by_last action from a resource inside a LWP, brian.bianco, 07/16/2012
Archive powered by MHonArc 2.6.16.