[chef] Overriding parts of recipes?


Chronological Thread 
  • From: Chad Woolley < >
  • To: Chef < >
  • Subject: [chef] Overriding parts of recipes?
  • Date: Mon, 31 May 2010 01:55:29 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=wd9KjnAHY5mcuJCsnUESs0SoxfxXRjEyQr/2EZW8XWzVLozQoAmXkdC/DEA5MW8CK+ EGdQIcVUhpKFkkL8dVtQ77EcILLj0hnNhNjwlkouWEJ8DZBjkIBgXPZ7gYZEJcviua2d OjivQfCDc+XzTMncmZvCW3rVTRqWpsM/HwMis=

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.

§