Hi, My problem is solved now, I'll see if I can change the topic title to reflect that.
The final solution looks like this: jboss_application::app_version::jvm_defaults: additional_java_opts: useconcmarksweepgc: '-XX:+UseConcMarkSweepGC' newratio: '-XX:NewRatio=2' cmsclassunloadingenabled: '-XX:+CMSClassUnloadingEnabled' onoutofmemoryerror: '-XX:OnOutOfMemoryError=''kill -9 %p''' heapdumponoutofmemoryerror: '-XX:+HeapDumpOnOutOfMemoryError' I know it looks a bit like some kind of 'Frankenstein' solution, but it does the job. Setting a value to 'null' causes the value from the same key (if present) from the next step in the hierarchy to be used, so that is not very useful. However this is overcome by using 'false' as a boolean value (so no quotes) and checking that in the template like this: <%- if @additional_java_opts and ! @additional_java_opts.empty? -%> <%- @additional_java_opts.keys.sort.each do |key| -%> <%- if @additional_java_opts[key] -%> <%- %>JAVA_OPTS="$JAVA_OPTS <%= @additional_java_opts[key] %>" <%- end -%> <%- end -%> <%- end -%> This does not prevent anything weird occurring when someone makes a typo in a key, but at least I can be really specific in my configurations and don't need to alter the template or manifest for every possible option of the JVM. The 'sort' is needed because the order of the hash entries is not predetermined in Ruby 1.8 (it is in Ruby 1.9). > That is a recognized flaw in Hiera, in that the appropriate form of lookup is (should be) a characteristic of the data, not of the query. Very true, for this reason I already use a (ugly) work-around in this case: https://www.2realities.com/blog/2014/07/05/puppet-hiera-hash-merge-and-automatic-parameter-lookup/ > You're missing my point there, I think: if you modify the form of the data, then almost surely you *must* modify the data consumer. I was merely pointing out I need to be careful when I change it, not that I can ignore it. Thanks for your insights. Regards, Steven -- 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/7ce70473-5820-4dbd-b22a-c1f86dad198b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.