[chef] Re: Re: notifies :before


Chronological Thread 
  • From: Steven De Coeyer < >
  • To:
  • Subject: [chef] Re: Re: notifies :before
  • Date: Thu, 21 Nov 2013 15:20:44 +0100

Thank you for your reply. I understand how notifies work, I was just wondering if there was an elegant way to notify resources _before_ running current resource.

I know you could do it with chaining resources through notify, but that smells a bit.

I found an issue asking the same question:
https://tickets.opscode.com/browse/CHEF-2421

On 21 Nov 2013, at 14:40, Jasna Benčić < > wrote:

check Chef webinar 1-4 (one of them has to have it) https://learnchef.opscode.com/

you define what service does in one snippet and you set notify stuff in other snippet


On Thu, Nov 21, 2013 at 1:39 PM, Steven De Coeyer < " target="_blank"> > wrote:
Ohai Chefs

I was wondering if someone had more elegant ideas for making resources notify another resource _before_ running itself.

I’d want something like this:

file 'foo’ do
  content ‘bar'
  notifies :stop, ‘service[foobar]', :before
  notifies :start, ‘service[foobar]’, :immediately
end

I realise this is possible with chaining resources. But I was wondering if there were more elegant solutions.

Kr,
Steven





Archive powered by MHonArc 2.6.16.

§