- From: Adam Jacob <
>
- To: Noah Kantrowitz <
>
- Cc: Akzhan Abdulin <
>,
- Subject: [[chef-dev]] Re: [[chef-dev]] Re: [[chef-dev]] Notify blocks
- Date: Fri, 7 Jan 2011 17:16:36 -0800
On Fri, Jan 7, 2011 at 9:30 AM, Noah Kantrowitz
<
>
wrote:
>
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.
From the link you pasted, I'm not sure I understand your use-case here, Noah.
You want to trigger an action on a resource outside of another
resource triggering it through notification? If so:
# At compile time
resources(:service => "apache2").run_action(:restart)
# At run time
ruby_block "foo" do
block do
resources(:service => "apache2").run_action(:restart)
end
end
Otherwise, I'm not sure what you would be gaining.
Adam
--
Opscode, Inc.
Adam Jacob, CTO
T: (206) 508-7449 E:
Archive powered by MHonArc 2.6.16.