rhel 6.4
puppet 3.1.1

I've written a puppet module for configuring qpidd brokers.  I have 
installed the module in /usr/share/puppet/modules.
I can successfully configure broker artifacts (exchanges, queues, bindings, 
etc), using manifests and puppet apply from the commandline.
Now I'm trying to understand how I can do the same thing from inside a ruby 
script, instead of using 'puppet apply'.

I found that I can do this:
service = Puppet::Type.type(:service).new(:name=>'qpidd')
service.provider.start


I would like to be able to do the same thing with my custom types, e.g.
broker = Puppet::Type.type(:broker).new(:service_name=>"qpidd_#{area_id}", 
:url=>@broker_url)
or 
exch = Puppet::Type.type(:exchange).new(:name=>'test')

but in both cases, I get:
undefined method `new' for nil:NilClass (NoMethodError)

so I checked the Puppet::MetaType::Manager   @types, and my custom type 
doesn't show up in the list of known types.

How do I tell the manager about my custom type so it can look it up when I 
use .type(:symbol) ?

thanks,
Hunter

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to