Puppet 0.24.8.

I'm building a custom type and have run into a bit of a snag. If I try to
require another plugin, my type fails to load on the "Retrieving plugins"
stage of the client run.

I've tried to isolate this from my code by running extremely simple plugins.
Here's my custom type (called by the relevant init.pp):
---------------------------------------------
# puppet/modules/testmodule/plugins/puppet/type/testtype.rb
require 'puppet/external/testing'

module Puppet
  newtype(:testtype) do

    newparam(:target) do
      desc "The path to the configuration file we're editing"
      defaultto "/usr/local/etc/testfile"
    end

    newparam(:name, :namevar => true) do
      desc "The name"
    end

     newproperty(:ensure) do
       desc "Basic state"
       newvalue :present
       newvalue :absent

       def retrieve
         File.exists?(@resource[:target]) ? :present : :absent
       end

     end
  end
end
---------------------------------------------


Here's puppet/external/testing:
---------------------------------------------
# puppet/modules/testmodule/plugins/puppet/external/testing.rb
class JustTesting
end
---------------------------------------------

Both plugins are getting synced up correctly to the client machine (under
/var/puppet/lib), but if the client runs like this I end up with the
following error:

err: Could not retrieve catalog: Could not find resource type testtype at
/usr/local/etc/puppet/modules/testmodule/manifests/init.pp:119 on node
testbox

If I comment out the "require" line in testtype.rb, it runs just fine. If I
change that line to require something builtin like puppet/external/lock, it
works.

Am I doing something wrong here?

-Shawn

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to