[chef] Re: Re: Re: Choosing resource providers


Chronological Thread 
  • From: Arjuna Christensen < >
  • To:
  • Subject: [chef] Re: Re: Re: Choosing resource providers
  • Date: Sun, 23 Aug 2009 02:18:47 +1200

Hi,

On 23/08/2009, at 1:32 AM, Claus Divossen wrote:

Hello!

Is there a way to configure the provider for a resource

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.

Oh, that's fine. In fact, if I could I would like to change the default
for my whole site, to make all the linux nodes use yum.

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

":deploy"? Did you mean ":package"? Like:

Chef::Platform.platforms[:default].merge! :package =>
Chef::Provider::Package::Yum

Sorry about that, I sure did. Pasted example from the 'deploy' resource ;)

-- 
AJ Christensen, Software Engineer




Archive powered by MHonArc 2.6.16.

§