[chef] Taking temporary downtime for a service


Chronological Thread 
  • From: Jeremy Voorhis < >
  • To:
  • Subject: [chef] Taking temporary downtime for a service
  • Date: Mon, 18 Mar 2013 16:46:12 -0700

Hello,

It's common to temporarily disable a service while performing certain changes:

# recipe[monit::default]
service :monit do
  # ...
  action [:enable, :start]
end

# recipe[myapp::deploy]
service :monit do
  action [:stop]
end

# deploy happens ...

service :monit do
  action [:start]
end

I'd like to know if anybody has a good pattern for triggering start/stop actions for a service without duplicating the resource within a recipe. Alternative methods to achieve the same effect are welcome!

Thanks,

--
Jeremy Voorhis



Archive powered by MHonArc 2.6.16.

§