Issue #2309 has been updated by James Turnbull. Target version changed from Rowlf to Statler
---------------------------------------- Bug #2309: Defined resources are not evaluated immediately which can cause ordering problems http://projects.reductivelabs.com/issues/2309 Author: Ohad Levy Status: Accepted Priority: Normal Assigned to: Category: language Target version: Statler Affected version: 0.24.8 Keywords: Branch: Because defined resources are queued as they're defined, and only evaluated when all other work is done, we can see ordering issues. In the example below, the two classes are evaluated to the level of the defined resource, and then stopped. This results in the variable modification in the defined resource not getting called until after the template is evaluated. The correct behaviour should see the defined resource getting evaluated as soon as it is added to the catalog, rather than queueing it for later. original description: it seems that templates ignore variable scopes, consider this code: <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 } } </pre> 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.
