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/n05oa6%2461p%241%40ger.gmane.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to