[chef] Re: Overriding parts of recipes?


Chronological Thread 
  • From: Ho-Sheng Hsiao < >
  • To:
  • Subject: [chef] Re: Overriding parts of recipes?
  • Date: Mon, 31 May 2010 14:20:26 -0400
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=OywZJ52RJ/5BPr3EgP8Bi6PZdLRB6pZgsFE4P9raUopXIVXezJnOILrGnSbw6FaOOW 26b25Hi732q2F4RTqX/Wgr55Tvnej8t7Vf/1LbmC+hTCiU6+IbfPHJjpM5pvynZ9mmGl mVJ64HIci7kksDVJdWgljaAfs61m7MnK7M2dA=

You could create a site-tomcat6 cookbook in which the recipe there
include_recipe(:tomcat) to include it.

I personally would not want to have an implicit merge for cookbooks.

-Hosh

On Mon, May 31, 2010 at 4:55 AM, Chad Woolley 
< >
 wrote:
> I need to override the tomcat6 recipe to disable a single line:
>
> http://github.com/opscode/cookbooks/blob/master/tomcat6/recipes/default.rb#L192
>
> How should I go about this?  I tried this and failed:
>
> 1. I have my custom cookbooks in the cookbook_path after the opscode version
> 2. I created a 'tomcat6' cookbook in my custom cookbooks, which only
> override this single template entry in the default recipe
>
> However, this doesn't work, because it doesn't seem to process the
> main opscode version before mine.  Is it possible to "merge" them to
> have all the logic from the original with only my override, THEN run
> it?
>
> My only option now seems to be to clone the entire opscode original
> cookbook into my custom cookbooks and disable that one line, which
> seems less than optimal.
>
> Thanks,
> -- Chad
>
> P.S.  When googling I found this, but it doesn't answer my problem:
> http://support.scalarium.com/faqs/custom-instance-setup/how-to-override-templates-in-custom-chef-recipes
>



Archive powered by MHonArc 2.6.16.

§