On Tue, Sep 18, 2012 at 4:08 PM, Andy Parker <[email protected]> wrote:
> On Tue, Sep 18, 2012 at 11:43 AM, Philip Brown <[email protected]> wrote:
>>>>>
>>> I think (haven't tried) that you can do "puppet resource ....
>>> provider=pkg_test" if you also rename the provider to pkg_test in the
>>> pkg_test.rb file.
>>>
>>
>> Hmm. well, it does seem to not complain, if you put it as the last
>> thing on the line.
>> However, according to --debug, it doesn't seem to actually DO anything.
>> It still calls all the other providers.
>>
>> debug: Puppet::Type::Package::ProviderRpm: file rpm does not exist
>> debug: Puppet::Type::Package::ProviderUp2date: file
>> /usr/sbin/up2date-nox does not exist
>>  ....
>>
>
> That is odd. However, this should only work if you have a
> self.instances method. Can you post the code that you are trying to
> use?
>

Do this on a solaris 11 box:

(go to the package providers dir)
cp pkg.rb pkg_test.rb
(edit pkg_test.rb and change "pkg" class identity references to pkg_test)
  (I think that means just changing the first ":pkg" to ":pkg_test" ? )

puppet  resource --debug package gnu-patch provider=pkg_test


You will then see debug output by practically all other package providers.

I suppose I should mention that the puppet version I'm using, is that
autobuilt by ruby gems.
2.7.18

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to