[chef] Re: Graceful exit mid chef run


Chronological Thread 
  • From: AJ Christensen < >
  • To:
  • Subject: [chef] Re: Graceful exit mid chef run
  • Date: Tue, 27 Nov 2012 13:55:14 +1300

Hello,

Sorry for top-post; our runlist_modifiers cookbook allows for one to raise a RestrictedRecipe error, which unfurls the run-list so to speak, so that dependant (or depended-upon) recipes are also skipped. [0]

Cheers,

--AJ

[0]: http://community.opscode.com/cookbooks/runlist_modifiers


On 27 November 2012 13:52, Wade Peacock < " target="_blank"> > wrote:

Hi All,

 

I there a graceful way to exit a chef run (skill all remain cookbooks/recipes) if a condition is not met.

 

Scenario:

 

Recipe 1

Recipe 2 (condition not met)

Recipe 3 Skip

Recipe 4 Skip

 

Use would be where a manual sysadmin step is need prior to continuing.

 

I'm looking for a way to prevent a tangled web of only_if/not_if statements.

 

I've tried using native ruby alert("message here") but it exits abruptly, and chef run is not reported back to server.

 

 

Wade Peacock
Production IT | Vision Critical
direct  604.629.9358

mobile  604.363.8137

 

www.visioncritical.com


New York  |  London  |  Vancouver |  Paris  | Sydney  |  Chicago |  San Francisco | Toronto | Montreal | Calgary

 





Archive powered by MHonArc 2.6.16.

§