Kenneth Lo
2012-Feb-06 16:53 UTC
[Puppet Users] What is the fully-qualified variable name format for external and factors variable in template erb file?
Trying to cleanup warning messages like the following: Dynamic lookup of $domain at /etc/puppetlabs/puppet/modules/centrifydc/templates/centrifydc.conf.erb:222 is deprecated. Support will be removed in Puppet 2.8. Use a fully-qualified variable name (e.g., $classname::variable) or parameterized classes. Do I simply replace <%= domain %> with <%= ::domain %> ? Same goes with variables define via dashboard? Thx in advance. --KL This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. -- 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
2012-Feb-06 18:04 UTC
Re: [Puppet Users] What is the fully-qualified variable name format for external and factors variable in template erb file?
There''s a couple of ways to do this, but I usually take the easy route: assign a local variable that has the global''s value in the related manifest. In this case, in centrifydc''s init.pp just set $domain=$::domain. This will appear as a local variable in the template and you don''t have to change your ERB at all. On Mon, Feb 6, 2012 at 8:53 AM, Kenneth Lo <klo@paydiant.com> wrote:> Trying to cleanup warning messages like the following: > > Dynamic lookup of $domain at > /etc/puppetlabs/puppet/modules/centrifydc/templates/centrifydc.conf.erb:222 > is deprecated. Support will be removed in Puppet 2.8. Use a > fully-qualified variable name (e.g., $classname::variable) or parameterized > classes. > > > Do I simply replace <%= domain %> with <%= ::domain %> ? > > Same goes with variables define via dashboard? > > Thx in advance. > > --KL > This message is for the designated recipient only and may contain > privileged, proprietary, or otherwise private information. If you have > received it in error, please notify the sender immediately and delete the > original. Any other use of the email by you is prohibited. > > -- > 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.-- 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.
R.I.Pienaar
2012-Feb-06 18:12 UTC
Re: [Puppet Users] What is the fully-qualified variable name format for external and factors variable in template erb file?
----- Original Message -----> There''s a couple of ways to do this, but I usually take the easy > route: assign a local variable that has the global''s value in the > related manifest. In this case, in centrifydc''s init.pp just set > $domain=$::domain. This will appear as a local variable in the > template and you don''t have to change your ERB at all.use @operatingsystem in a template as you would $::operatingsystem in a manifest. -- 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.