Hello puppet-dev,
I am working on a module that provides a custom type. The type when
called will create new resources in the catalog using syntax like:
Puppet::Type.type(:file).new(:title => 'blah')
This works fine and the resources are added as expected. However, I am
unable to apply any scoped defaults to the generated resources. So
something like:
File {
mode => 0750
}
would not be applied to the generated resources. I understand that this
is most likely because I am altering the catalog directly.
The only thing I can think of doing would be to retrieve the scoped
attributes first, and then apply them to the generated resource. I have
been trying to do this with code like:
f = Puppet::Type.type(:file)
f.allattrs.each do |attrname|
attrvalue = f.value(attrname)
puts "#{attrname} = #{attrvalue}"
end
I know this doesn't work, but wanted to throw this out there to see if I
am taking the wrong approach at fetching resource defaults from the
scope in which my custom type is called.
Thanks for any help or insight.
- Ryan
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-dev?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.