On Tuesday, May 20, 2014 5:36:40 AM UTC-5, Francis Pereira wrote:
>
> When using a custom resource to deploy java $name is not the name of the 
> resource but the name of the class in the below mentioned example
>
>  java::setup { "${myapplication::params::app_username}-jdk_7u51":
> .......
>     cachedir      => "/var/lib/puppet/file_cache/${name}-working",
>
>   }
>
> Shouldn't $name = ${myapplication::params::app_username}-jdk_7u51 ?
>
>

No.  The situation is analogous to a function call: if the argument list 
contains a variable, the value passed is the value of the variable in the 
calling scope, not the value of any same-named local variable in the called 
function.


John

-- 
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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/3866ded5-e517-478c-b876-ce821a5d2740%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to