Quantcast
Channel: Ask Puppet: Puppet DevOps Q&A Community - RSS feed
Viewing all articles
Browse latest Browse all 6104

Access to define resource variables?

$
0
0
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?

Viewing all articles
Browse latest Browse all 6104

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>