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

Get current default value

$
0
0
I managed to get the default value for a resource with this (so that I can add something to the defaults): define foo::bar($v) {} Foo::Bar { v => { 'foo' => 'bar' } } $a = parsejson(inline_template('<%= require "json"; scope.lookupdefaults("Foo::Bar")[:v].value.to_json %>')) notice($a + { 'a' => 'b' }) It's quite clunky though, so I wonder if there's a better way.

Viewing all articles
Browse latest Browse all 6104

Trending Articles



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