We are looking into earning a living building high-quality puppet modules and selling support on them. We would like a provider to allow certain actions based on an entitlement license. To do this we could use the type name as an entity, but it would be nice to cluster a set of types in a module entitlement.
For example: A module Tibco would have all the custom types needed to configure and manage a Tibco installation. In the providers I would like to check if the user is entitled to use the functionality on the current node. The tibco module would have multiple custom types, classes and defined types. Bert Op dinsdag 20 oktober 2015 17:58:30 UTC+2 schreef henrik lindberg: > > On 2015-16-10 18:11, bert hajee wrote: > > Hello , > > > > Is there a reliable way to get the module name inside of a custom type > > and/or a provider? reliable in a sense that it works both when using > > puppet apply and also works on an agent. > > > > What I've tried so far is to deducting the type name from the call stack > > and the source. This works when using Puppet Apply, but when you are > > running Puppet on an agent this doesn't work. The ruby code on the agent > > is a fl;at lib directory and all module structure is gone. > > > > Any suggestions would be welcome. > > > > Sounds like a design problem in general. It is never a good thing when > having to use information about the "caller" in a magic way. And in this > context you do not even have that information. > > Can you describe what you are trying to achieve - there is probably a > different way of getting what you want. > > Regards > - henrik > > > -- > > Visit my Blog "Puppet on the Edge" > http://puppet-on-the-edge.blogspot.se/ > > -- 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 puppet-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/e65c4ec6-9c9c-413d-bcc2-5e48446231f9%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.