Issue #1545 has been updated by R.I. Pienaar aka Volcane.

Luke Kanies wrote:
> I was afraid you were going to ask that. :/  With my current code, it's the 
> module that the definition is in, not the caller's module.  The latter is a 
> good bit harder.
> 
> Can you provide a use case?
> 
> I can kind of see why you want it, but having it a bit more concrete would be 
> useful for me.

the use case Alan shows is what I had in mind too, pre modules we were able to 
easily create utility file copiers:

<pre>
define myfile(....) {
   file{$name:
       source => ["puppet:///files/${name}.${fqdn}", "puppet:///files/${name}"]
   }
}

myfile{["/etc/foo", "/etc/bar"]: }
</pre>

which would take some predefined search order and just fetch it from the single 
big file server.  Now with module we cant do that, we need to somehow know 
which module to fetch the files from, having modulename to be the caller would 
make it great. since we can get back to something that simple
----------------------------------------
Feature #1545: The module name should be available as a variable
http://projects.puppetlabs.com/issues/1545

Author: Felix Schäfer
Status: Ready for Testing
Priority: Normal
Assigned to: Luke Kanies
Category: newfeature
Target version: 2.6
Affected version: 0.25.1
Keywords: 
Branch: luke/tickets/master/1545-module_name_as_variable


It's been discussed before in #1104, but I can't find a ticket for that, so I 
suppose there isn't one as of now.

Anyway, it would be nice to know which module some definition is being called 
from, this would save me some Common_definition { module => module1, } at the 
beginning of module1.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" 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-bugs?hl=en.

Reply via email to