On May 16, 2007, at 4:50 AM, Udo Waechter wrote:
> Hello all.
>
> I have a problem with custom types that I create:
>
> I have changed the apt package provider such that it it uses fink on
> darwin operating systems to install packages.
>
> I copied the apt.rb to fink.rb and customized it accordingly. Now
> when I
> follow the documentation:
> http://reductivelabs.com/trac/puppet/wiki/CreatingCustomTypes I should
> deploy it in lib/puppet/type.
>
> This does not work at all, since puppet does not load or recognizes it
> as a package provider.
Providers go in lib/puppet/provider/$type/$provider.rb. That
document was written before providers existed. We''ve got an open bug
to document them, which I''ll get to eventually, but if someone else
wants to...
> When I put it in
> /usr/lib/ruby/site_ruby/1.8/puppet/provider/package/fink.rb I get
> an error:
>
> "Could not set present on ensure: undefined method `[]'' for
> nil:NilClass
> at /etc/puppet/manifests/classes/darwin.pp:105"
>
> in darwin.pp I say:
>
> package { "findutils": ensure => installed, provider =>
fink }
>
> I had similar problems when deploying my appdmg.rb provider.
I''d need to see a stack trace (which you can get with --trace on
puppetd) to know what''s going on here.
Note that the next release will use @resource instead of @model
(while keeping @model around for compatibility).
> I still use 0.22.1
>
> Is it possible to deploy such new types as plugins, then they would be
> stored in /var/puppet/plugins and automatically synched.
I''m working on that, but at this point, only types can be copied
around as plugins, not providers.
--
Normal is getting dressed in clothes that you buy for work and driving
through traffic in a car that you are still paying for - in order to
get to the job you need to pay for the clothes and the car, and the
house you leave vacant all day so you can afford to live in it.
-- Ellen DeGeneres
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com