I''m testing 2.7.3 and getting a lot of these: warning: Dynamic lookup of $operatingsystem at /etc/puppet/modules/foo/manifests/bar.pp:36 is deprecated. Support will be removed in Puppet 2.8. Use a fully-qualified variable name (e.g., $classname::variable) or parameterized classes. $operatingsystem is a facter variable, of course. How are these supposed to be referenced? -- Darren Chamberlain <darren@boston.com> -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Thu, Aug 18, 2011 at 9:06 AM, Darren Chamberlain <darren@boston.com>wrote:> I''m testing 2.7.3 and getting a lot of these: > > warning: Dynamic lookup of $operatingsystem at /etc/puppet/modules/foo/**manifests/bar.pp:36 > is deprecated. Support will be removed in Puppet 2.8. Use a > fully-qualified variable name (e.g., $classname::variable) or parameterized > classes. > > $operatingsystem is a facter variable, of course. How are these supposed > to be referenced? > > -- > Darren Chamberlain <darren@boston.com> > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to puppet-users+unsubscribe@** > googlegroups.com <puppet-users%2Bunsubscribe@googlegroups.com>. > For more options, visit this group at http://groups.google.com/** > group/puppet-users?hl=en<http://groups.google.com/group/puppet-users?hl=en> > . > >They''re referenced like this: $::operatingsystem -- Gary Larizza Professional Services Engineer Puppet Labs Join us for PuppetConf <http://bit.ly/puppetconfsig>, September 22nd and 23rd in Portland, OR! -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On 8/18/2011 12:08 PM, Gary Larizza wrote:> On Thu, Aug 18, 2011 at 9:06 AM, Darren Chamberlain <darren@boston.com> wrote: > > $operatingsystem is a facter variable, of course. How are these > > supposed to be referenced? > > They''re referenced like this: $::operatingsystemThis works, thanks. While I haven''t tested using facts in templates yet, http://blog.penumbra.be/2011/08/dynamic-lookup-is-deprecated-when-using-facts-in-templates/ implies that I''m going to have the same problem there, as well. Tom''s solution is really unwieldy, though, and having to create local variables for every fact in every class that calls a template is going to lead to a lot of problems. -- Darren Chamberlain <darren@boston.com> -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
----- Original Message -----> On 8/18/2011 12:08 PM, Gary Larizza wrote: > > On Thu, Aug 18, 2011 at 9:06 AM, Darren Chamberlain > > <darren@boston.com> wrote: > > > $operatingsystem is a facter variable, of course. How are these > > > supposed to be referenced? > > > > They''re referenced like this: $::operatingsystem > > This works, thanks. > > While I haven''t tested using facts in templates yet, > http://blog.penumbra.be/2011/08/dynamic-lookup-is-deprecated-when-using-facts-in-templates/ > implies that I''m going to have the same problem there, as well. > Tom''s solution is really unwieldy, though, and having to create local > variables for every fact in every class that calls a template is > going to lead to a lot of problems.I concur, I think the way this change is exposed in templates is extremely user unfriendly, I''m personally avoiding moving to any version of puppet that force me to lookupvar() every variable use in a template or to create a ton of in-class variables as suggested -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Agreed, facts are the one thing that really should be global IMHO. On Aug 18, 2011 9:39 AM, "Darren Chamberlain" <darren@boston.com> wrote:> On 8/18/2011 12:08 PM, Gary Larizza wrote: >> On Thu, Aug 18, 2011 at 9:06 AM, Darren Chamberlain <darren@boston.com>wrote:>> > $operatingsystem is a facter variable, of course. How are these >> > supposed to be referenced? >> >> They''re referenced like this: $::operatingsystem > > This works, thanks. > > While I haven''t tested using facts in templates yet, >http://blog.penumbra.be/2011/08/dynamic-lookup-is-deprecated-when-using-facts-in-templates/> implies that I''m going to have the same problem there, as well. Tom''s > solution is really unwieldy, though, and having to create local > variables for every fact in every class that calls a template is going > to lead to a lot of problems. > > -- > Darren Chamberlain <darren@boston.com> > > -- > You received this message because you are subscribed to the Google Groups"Puppet Users" group.> To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email topuppet-users+unsubscribe@googlegroups.com.> For more options, visit this group athttp://groups.google.com/group/puppet-users?hl=en.>-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Aaron Grewell wrote :> Agreed, facts are the one thing that really should be global IMHO.I''d settle for anything short. If <%= ::factname %> could have worked, it would have been fine by me. What''s the "official best practice" going to be for facts inside templates with puppet 2.7+? lookupvar all over the templates? Iterative assignments of all used fact values to local scope variables? Have other solutions been looked into? The first that would come to my mind would be having something like "fact::" and use <%= fact::fqdn %>. Short-ish enough, very explicit and entirely isolated (except for anyone having a custom "fact" module ;-)). Matthias -- Clean custom Red Hat Linux rpm packages : http://freshrpms.net/ Fedora release 14 (Laughlin) - Linux kernel 2.6.35.13-91.fc14.x86_64 Load : 0.10 0.13 0.22 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
To me this only happens when I use an External Node classifier. https://projects.puppetlabs.com/issues/8174 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Same here, Chuck. Updated the issue. -- 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/-/CyGTQlF3kJUJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.