[chef] Re: Choosing resource providers


Chronological Thread 
  • From: Arjuna Christensen < >
  • To:
  • Subject: [chef] Re: Choosing resource providers
  • Date: Sat, 22 Aug 2009 22:37:57 +1200

Hi,

On 22/08/2009, at 10:27 PM, Claus Divossen wrote:

Hello!

Is there a way to configure the provider for a resource (i.e. the
package resource) for a whole node or at least the whole recipe? The
provider can be choosen for each resource individually, but I would like
to configure this only once so i don't have to repeat myself again and
again.

You're able to leverage a Library (http://wiki.opscode.com/display/chef/Libraries) to adjust our internal platform, platform version => provider mapping. (http://github.com/opscode/chef/blob/89a2609242a63d6bc85e0ddfed078319b4d4a81b/chef/lib/chef/platform.rb#L29). However be aware that once this is set, it will be valid for that entire 'run', or indefinitely while daemonized.

E.g.:

Chef::Platform.platforms[:default].merge! :deploy => Chef::Provider::Deploy, :gem_package => Chef::Provider::Package::Rubygems

Hope this helps,
-- 
AJ Christensen, Software Engineer

Attachment: PGP.sig
Description: This is a digitally signed message part




Archive powered by MHonArc 2.6.16.

§