The correct way is simply

$java_home = $java_home_var

Barring that, this is the correct way to use a template:

$java_home = inline_template('<%= @java_home_var %>')

While not deprecated, scope.lookupvar is the wrong way to do variable
access in templates.


On Sat, Sep 6, 2014 at 9:45 AM, Felix Frank <[email protected]
> wrote:

>  On 09/05/2014 07:22 PM, Brandon Metcalf wrote:
>
> Using puppet 3.4.3 and getting the following warning:
>
>  Variable access via 'java_home_var' is deprecated. Use '@java_home_var'
> instead. template[inline]:1
>
>  from the following line:
>
>  $java_home     = inline_template('<%= scope[@java_home_var] %>')
>
>  Any ideas?  Thanks.
>
>
> It's a little confusing, yes. But I suspect the problem is the scope[]
> expression. Have you tried scope.lookupvar(@java_home_var) instead?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/540B3A44.50407%40Alumni.TU-Berlin.de
> <https://groups.google.com/d/msgid/puppet-users/540B3A44.50407%40Alumni.TU-Berlin.de?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Spencer Krum
(619)-980-7820

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CADt6FWOHVTxvD_PzyeRaa9jkkGrFp%2Br%3DMGs0ZpbfzVAxDfwjjw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to