[chef] Re: Re: Exiting a run mid way through


Chronological Thread 
  • From: AJ Christensen < >
  • To:
  • Subject: [chef] Re: Re: Exiting a run mid way through
  • Date: Tue, 17 Apr 2012 10:16:46 +1200

I believe I've used 'return' in a run to halt its processing by the
recipe compiler, too, although you'll have to test it works as you
expect.

return ArgumentError unless node.foo.has_key? :bar

--AJ

On 17 April 2012 10:12, Noah Kantrowitz 
< >
 wrote:
> Just raise an exception, it will abort the run.
>
> --Noah
>
> On Apr 16, 2012, at 1:18 PM, Kendrick Martin wrote:
>
>> Hello all,
>> I’m looking for a way to exit a chef run gracefully(including calling 
>> handlers) if a specific resource is notified. I am using the reboot 
>> handler used in the windows cookbook. I would like the chef run to stop if 
>> this resource provider is called so a reboot can be processed. Is there an 
>> easy way to accomplish this?
>>
>> Kendrick
>>
>



Archive powered by MHonArc 2.6.16.

§