Issue #1545 has been updated by Alan Barrett.
What happens if my module calls a define from another module? I think that it
would be more useful if $module_name referred to the caller's module, not the
define's module.
<pre>
/* <modulepath>/mymodule/manifests/init.pp */
class mymodule {
util::myfile { "foo": }
}
/* <modulepath>/util/manifests/myfile.pp */
define util::myfile {
file { "/tmp/$name:
ensure => file,
source => "puppet:///${module_name}/${name}",
# is $module_name "util" or "mymodule"?
}
}
</pre>
----------------------------------------
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.