I often find that I want/need to reference a variable value declared by a define. For example the value of $home in the below snippet.
define example(
$install_dir,
){
$home = "${install_dir}/some/path/${title}"
}
example{'one':}
example{'two':}
In the code I typically already know the title and type of a resource for which I want to know the $home value. What I would really like to do is reference the resource $home value using the type and title similar to what is done with resource dependencies. Something like:
$Example['one']::home
Of course puppet errors with the above syntax. But it brings me to my question... Is there a way to reference resource variable values of instantiated defines?
↧