Issue #4717 has been updated by Andrew Parker. Target version deleted (2.7.x)
---------------------------------------- Bug #4717: Global variables are no longer fully global https://projects.puppetlabs.com/issues/4717#change-80271 Author: Dan Urist Status: Needs More Information Priority: Normal Assignee: Category: Target version: Affected Puppet version: 0.25.5 Keywords: global variable scope Branch: A variable defined in global scope is no longer visible in the global scope of other files. For example: site.pp: $testvar = "TESTVAR_VALUE" nodes.pp: notice("testvar outside node is: ${testvar}") node 'test.puppet.cms.ucar.edu' { notice("testvar inside node is: ${testvar}") } The log contains this after a puppet run: puppet-master[3758]: (Scope(Class[main])) testvar outside node is: puppet-master[3758]: (Scope(Node[test.puppet.cms.ucar.edu])) testvar inside node is: TESTVAR_VALUE If I move the node definition to site.pp, so it is in the same file as the variable definition, then it's defined both outside and inside the node definition. I haven't tested whether the same issue exists for classes as well as nodes. Note that the behavior in 0.25 was that the global variable was defined everywhere, which is what I would expect (and is the behavior some of my modules rely on). -- 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.
