Issue #2309 has been reported by Ohad Levy.
----------------------------------------
Bug #2309: templates are processed too early in the compliation
http://projects.reductivelabs.com/issues/2309
Author: Ohad Levy
Status: Unreviewed
Priority: Normal
Assigned to:
Category:
Target version:
Complexity: Unknown
Affected version: 0.24.8
Keywords:
it seems that templates ignore variable scopes, consider this code:
<pre>
</pre>node default {
include a
include b
}
class a {
$dirs = ""
dir{["/tmp","/tmp/a","/tmp/b"]: before => File["/tmp/dirs"]}
}
class b {
file{"/tmp/dirs": content => $a::dirs}
#file{"/tmp/dirs": content => template("/tmp/dirs.erb")}
}
define dir() {
$a::dirs += " $name"
file {$name: ensure => directory }
}
using template the output of the file is "", but when dumping the variable
directly, the content is correct.
--
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://reductivelabs.com/redmine/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
-~----------~----~----~----~------~----~------~--~---