[chef] Re: How to ignore some exception in a cookbook


Chronological Thread 
  • From: Xabier de Zuazo < >
  • To:
  • Subject: [chef] Re: How to ignore some exception in a cookbook
  • Date: Thu, 26 Feb 2015 20:38:23 +0100

On 2015-02-27 06:35, Anthony Kong wrote:
> In one of my receipt I need to install a gem
> 
> gem hipchat do
>   action: install
> end
> 
> [...]
> Is there any way I can prevent its failure from stopping the convergence?

Try with ignore_failure:

gem hipchat do
  ignore_failure true
  action: install
end

http://docs.chef.io/resource_common.html#attributes

-- 
Xabier de Zuazo
IT System Administrator - Onddo Labs S.L.
www.onddo.com
--------------------------------------------------------------------
Public Key = http://www.onddo.com/xabier_zuazo.pub
Key Fingerprint = 8EFA 5B17 7275 5F1F 42B2  26B4 8E18 8B67 9DE1 9468
--------------------------------------------------------------------

Attachment: signature.asc
Description: Digital signature




Archive powered by MHonArc 2.6.16.

§