On May 11, 2010, at 10:59 PM, Richard Crowley wrote:
The confusion here is that we're kind of mid-transition in the
system right
now - we haven't yet completely transitioned to using
Puppet::Resource. You
need to be creating an instance of a 'user' resource class:
user = Puppet::Type.type(:user).new(:name => "demo", :ensure
=> :absent)
I discovered Puppet::Resource::Catalog#create_resource which calls the
Puppet::Type subclass' constructor a little differently and then calls
Puppet::Resource::Catalog#add_resource with the resulting Puppet::Type
subclass instance. Is this the right way to go for the future?
Just create the resource like I said, in a generate method. This way
Puppet will take care of adding it to the catalog, and it will do some
smart things like if there's a duplicate resource in the catalog,
it'll prefer that resource over your generated one, assuming it's made
by a human and thus more specific.
--
I went to a restaurant that serves "breakfast at anytime". So I
ordered French Toast during the Renaissance. -- Stephen Wright
---------------------------------------------------------------------
Luke Kanies -|- http://puppetlabs.com -|- +1(615)594-8199
--
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.