Thanks!I'm thinking something like this, but no idea if it would work?what function can be called to add something to the notification stack?the trouble with this approach is that tomcat6 gets restarted immediately when deploy triggers a restart. Instead, I want deploy to "notify" tomcat6 to restart at the end of the chef run.For one of my projects, I need to be able to tell the deploy resource how to restart a service.Currently, I do it like this:
unless new_resource.restart_command
new_resource.restart_command do
run_context.resource_collection.find(:service => "tomcat6").run_action(:restart)
end
end
unless new_resource.restart_command
new_resource.restart_command do
run_context.notifies_delayed(Chef::Resource::Notification.new(:service => "tomcat6", :restart, self))
end
end
Archive powered by MHonArc 2.6.16.