You don't have to have action :nothing to be able to notify them.
Adam
From: Tensibai <
">
>
Reply-To: " "> " < "> > Date: Friday, February 22, 2013 12:36 AM To: " "> " < "> > Subject: [chef] Re: Re: delayed execution order error? I do understand (I think). What is unclear is why a service ressource defined with action :start (for exemple) won't accept/honor any notification to stop or restart. I end up defining the service ressource with action :nothing and having a log ressource notifying it to start to ensure the service will be started at the end of chef run. If someone has an idea ;) Tensibai Le 2013-02-21 21:34, Joshua Timberman a écrit : You should use the updated notification syntax for notifies: notifies :restart, "service[foo]" Instead of this: notifies :restart, resources(:service => "foo") # or... notifies :restart, resources("service[foo]") The #resources() method here does a lookup of all the resources in the resource collection for the one named in order to set the notification, and it evaluates during the resource collection compilation phase. This is why you had to declare a resource with action :nothing prior to notifying it. Note that the subscribes parameter requires the latter style using the #resources() method. On Feb 21, 2013, at 10:17 AM, Tensibai < "> > wrote:Hum.. I remember having to define services with action :nothing to be able to notify them. I'm quite sure you have an action :restart inside the service declaration. Fot what I understand, the service is define to restart, it does restart and ignore any notification as it has already do what it was suppose to do (restart). Set action to nothing in your service and notifications for restart will be ok I think.
|
Archive powered by MHonArc 2.6.16.