[chef] Re: Using notify to run a recipe


Chronological Thread 
  • From: Daniel DeLeo < >
  • To:
  • Subject: [chef] Re: Using notify to run a recipe
  • Date: Tue, 28 Aug 2012 08:53:05 -0700


On Tuesday, August 28, 2012 at 6:35 AM, Tom wrote:

Hi,

Is it possible to make a resource notify, (and thus run) an entire recipe.

For example:
  I wish to upgrade a package, but it depends on certain resources being executed - either before or after the package installation.

Is it possible to do something like:

package "application" do
  action :upgrade
  notifies recipe[pre_inst]
end

?
No, you can't do that, but you can have multiple notifications by putting multiple calls to notifies in the resource declaration. There may be jacky ways to do exactly what you want using ruby_block resources and internal Chef APIs, but I'd recommend against it.
 

thanks


-- 
Daniel DeLeo




Archive powered by MHonArc 2.6.16.

§