[chef] Re: "notify" on any change made in an include_recipe call


Chronological Thread 
  • From: Lamont Granquist < >
  • To:
  • Cc: Jeff Blaine < >
  • Subject: [chef] Re: "notify" on any change made in an include_recipe call
  • Date: Tue, 29 Sep 2015 14:15:35 -0700


Nope, include_recipe is a compile-time hack more like #include than a resource.

If we had resources that were recipes you might be able to do something like that (in fact that is an excellent requirement for recipes-as-resources as a feature).

On 09/29/2015 01:53 PM, Jeff Blaine wrote:
I've never seen any code to do this, so I figured I'd throw it out there
as a question in case there's some crazy existing way to solve it.

Cookbook reuse... Community cookbooks...

Is something like the following idea possible? Or is the lack of ability
to do the following one of the reasons for the new-headed resource-heavy
cookbook design push[1]?

include_recipe 'java' do
   notifies :restart, 'service[myjava-service]', :immediately
end

Footnotes:

1. java "8" do
      notifies :restart, 'service[myjava-service]', :immediately
    end





Archive powered by MHonArc 2.6.16.

§