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


Chronological Thread 
  • From: Adam Jacob < >
  • To:
  • Subject: [chef] Re: RE: Re: Exiting a run mid way through
  • Date: Tue, 17 Apr 2012 12:16:30 -0700

There may be hacks you can do that will work "better", but they'll be
more brittle. I would recommend:

You do something like:

ruby_block "stop now" do
  code do
    raise "This is really okay, man"
  end
  action :nothing
end

Then have an error handler that looks for that exception, and if it
finds it, triggers the normal exception handlers.

Ugly, but it'll work.

Adam

On Tue, Apr 17, 2012 at 11:34 AM, Kendrick Martin
< >
 wrote:
> On Windows, if UAC is enabled for example, I want to disable it, call the 
> reboot handler and exit the run right away. Things further down the run 
> might hit issues if UAC isn't disabled before hand.
>
> -----Original Message-----
> From: Adam Jacob 
> [mailto:
> Sent: Tuesday, April 17, 2012 10:51 AM
> To: 
> 
> Subject: [chef] Re: Exiting a run mid way through
>
> No. Why do you not want the rest of the chef run to continue? If the 
> resources are idempotent, it shouldn't make more than a small amount of 
> difference.
>
> I can think of some ways you can hack this, but really, are you sure this 
> is the behavior you really want?
>
> Adam
>
> On Mon, 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
>>
>>
>
>
>
> --
> Opscode, Inc.
> Adam Jacob, Chief Customer Officer
> T: (206) 619-7151 E: 
> 



-- 
Opscode, Inc.
Adam Jacob, Chief Customer Officer
T: (206) 619-7151 E: 




Archive powered by MHonArc 2.6.16.

§