[chef] Re: Re: Notifying Resources within Ruby Block Resource


Chronological Thread 
  • From: "Mark J. Reed" < >
  • To:
  • Subject: [chef] Re: Re: Notifying Resources within Ruby Block Resource
  • Date: Mon, 14 Nov 2011 18:36:35 -0500

On Mon, Nov 14, 2011 at 6:32 PM, Joshua Timberman < "> > wrote:
You can do this:

   ruby_block "some ruby code" do
     block do
       # the actual stuff in the block
     end
     notifies :action, "resource[other resource]"
   end

Note that the notifies goes after the `block` parameter's block.

...or before.  Outside of, anyway.  

However, the important thing to note is that the notification is unconditional; if the Ruby block executes, the notification is sent. There is currently no way (AFAIK) for a Ruby block to change its updated_by_last_action state to false.

 
--
Mark J. Reed < "> >




Archive powered by MHonArc 2.6.16.

§