On Dec 31, 2008, at 11:09 AM, Andrew Shafer wrote:
> > Two questions > Can we see the provider code? (specifically the line that starts the > block) Puppet::Type.type(:package).provide :pkgutil, :parent => :sun, :source => :sun do Turns out there are some differences in implementation between pkgutil and pkg-get. I'm not good enough at puppet plugin development nor ruby to fix the plugin, but I'll keep trying. > > > Does it work on the next pass? > > Also, for the plugin the dir structure should end 'package/pkgutil.rb' Ah, of course. After fixing that the plugin approach works. > > > Andrew > > On 12/31/08, Carl Caum <carl.c...@gmail.com> wrote: >> I have written a custom package provider for the pkgutil utility on >> Solaris 10. Pkgutil replaces pkg-get which is not deprecated. All I >> did was modify the Blastwave provider to use pkgutil instead of pkg- >> get. I've tried two approaches to get the provider on to the client. >> First, I created a plugin. I created a module called package to >> contain the plugin. The only file in the plugin is: >> /etc/puppet/modules/package/plugins/puppet/provider/pkgutil/ >> pkgutil.rb >> >> The plugin syncs just fine to the client and the pkgutil.rb file is >> placed in /var/lib/puppet/lib/puppet/provider/pkgutil/ >> However, puppetd does not see the provider and the compilation of the >> manifest fails with "Parameter provider failed: Invalid package >> provider 'pkgutil' " >> >> The second thing I tried is to create a file resource placing the >> pkgutil.rb file in to the proper place on the client. Then I added a >> require parameter as a default parameter to the package resource. >> However, this didn't work either. My manifest looks like this: >> >> Package { >> provider => "pkgutil", >> require => File["/opt/csw/lib/ruby/gems/1.8/gems/ >> puppet-0.24.7/lib/puppet/provider/package/pkgutil.rb"], >> } >> >> file {"/opt/csw/lib/ruby/gems/1.8/gems/puppet-0.24.7/lib/puppet/ >> provider/package/pkgutil.rb": >> ensure => present, >> source => "puppet://puppet/files/pkgutil.rb", >> } >> >> Puppetd doesn't seem to execute the require when it encounters a >> package resource such as samba. So I get the "Parameter provider >> failed: Invalid package provider 'pkgutil' " error. >> This seems oddly similar to this issue which doesn't seem to be >> solved: >> http://groups.google.com/group/puppet-users/browse_thread/thread/52072faf98706b86?pli=1 >> >> Any ideas? >>> >> > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---