On Tuesday, June 19, 2012 7:19:20 AM UTC-7, jcbollinger wrote: > > > Have I missed a change in plan for node variables, so that in Puppet 3 > they remain accessible outside node declarations? Does that form of > dynamic scoping live on? > > Yeah, they're effectively a tiny island of dynamic scoping in the otherwise-static sea. It turned out we had to do it that way -- we're working on replacing node definitions as we know them with something better, but we couldn't do everything in one fell swoop, so we're in a bit of an awkward stage for the moment.
What I've been trying to tell people is: - node scope is special - it overrides top scope - everything (including classes from ENCs!) gets the combined contents of node and top scope - UNLESS it's a class you EXPLICITLY declared outside of node scope. - oh, and don't ever use node inheritance. There might be a better way to talk about that; if so, we'll figure it out as we go. On Tuesday, June 19, 2012 7:19:20 AM UTC-7, jcbollinger wrote: > > > > On Tuesday, June 19, 2012 7:20:47 AM UTC-5, R.I. Pienaar wrote: > >> > Right now I'm referencing the variable as "<%= ldap_server %>" and >> > puppet is complaining on startup about dynamic scoping and telling >> > me this will break. So clearly this isn't the way to go otherwise I >> > wouldn't have the warning. >> >> I think this warning is gone in a slightly newer version of 2.7.x >> > > Have I missed a change in plan for node variables, so that in Puppet 3 > they remain accessible outside node declarations? Does that form of > dynamic scoping live on? > > Whether referencing node variables is deprecated or not, there are several > alternatives: > > - global variables can be used instead if you have an ENC to set > node-specific values for them, and > - some people would recommend parameterizing your class, > - but I would recommend putting your node-specific data in an external > data store and accessing them via hiera. > > John > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/aDb4tWzEwxwJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.