- From: Bryan McLellan <
>
- To:
- Subject: [chef] Re: server's reboot action
- Date: Thu, 30 Aug 2012 15:03:15 -0400
On Thu, Aug 30, 2012 at 5:31 AM,
<
>
wrote:
>
Just started to work with recipies . How to define server's reboot ?
This is a terrible abuse of resources due to the lack of being able to
trigger a notification as a first class object, but this works for
triggering a reboot toward the end of the run. There is not a way to
control the order of the delayed notifications though, so if you have
notifications that are important this might run before them. Usually
delayed notifications are for services though, and since you're
rebooting anyway, that shouldn't be a problem.
execute "reboot" do
command "reboot"
action :nothing
end
ruby_block "trigger delayed reboot" do
block { true }
notifies :run, "execute[reboot]", :delayed
end
Archive powered by MHonArc 2.6.16.