- From: Bryan McLellan <
>
- To:
- Subject: [chef] Re: Re: Re: Dependancy order problem
- Date: Tue, 28 Dec 2010 10:28:52 -0800
On Tue, Dec 28, 2010 at 9:43 AM, Ash Berlin
<
>
wrote:
>
Hmmm i might also be able to do this:
>
>
n = service "nginx" do
>
action [ :enable ]
>
end
>
>
n.notifies :start, n
>
>
Which just has the effect of delaying the start till the end of the run (I
>
think.) Thoughts?
Totally, you got the idea. TMTOWTDI.
Once upon a time we did something like this in the apache2 cookbook:
r = service "apache2" do
action :enable
end
r.updated = true
r.notifies(:start, r, :delayed)
Here is the current version of the evolution of the examples I have given:
https://github.com/opscode/cookbooks/blob/master/apache2/recipes/default.rb
You'll notice that we define the apache2 service pretty heavily early
on, but don't try to start it until the very end of the recipe.
Bryan
Archive powered by MHonArc 2.6.16.