[[chef-dev]] Re: [[chef-dev]] Notify blocks

Chronological Thread 
  • From: Noah Kantrowitz < >
  • To: Akzhan Abdulin < >
  • Cc:
  • Subject: [[chef-dev]] Re: [[chef-dev]] Notify blocks
  • Date: Fri, 7 Jan 2011 09:30:43 -0800

That isn't the same thing, it would a ruby block generating a notification, not receiving one. It can certainly be done already though (see the link I pasted) but it looks kind of clunky. There is already a precedent with not_if and only_if of taking either a block or "something else" too.


On Jan 6, 2011, at 11:34 PM, Akzhan Abdulin wrote:

Is it already implemented

ruby_block do
  code do
    sleep 1
  notifies :restart, resources(:service => :nginx80)

2011/1/7 Noah Kantrowitz 
< >
Random feature idea from #chef-hacking tonight that doesn't seem that hard: allow giving a block to notifies on a resource. It would internally be the same as https://github.com/opscode/java-quick-start/blob/master/cookbooks/dbapp/recipes/db_bootstrap.rb #L37 but without all the extra typing. To my sleep-addled brain it looks like it wouldn't be hard to implement. Thoughts?


Archive powered by MHonArc 2.6.16.