On 07/14/2014 02:49 PM, Gavin Williams wrote: > I think the 2 provided examples give different challenges. > /jre.properties/[3]//strikes me as the most troublesome initially, due > to the nature of the contents and the format reqs... > My initial thought is to provide a type that can manage the file, and > possibly use Augeas to manage the file. Happy for other suggestions > though :)
If I'd need Puppet to manage that, I'd likely want to be able to manage each LeftHandSide/ListElement pair via ensure. I.e., I don't want to enumerate the full lists in manifest or hiera, but just want to make sure distinct elements are there ore not. > /wrapper.conf/[4]//looks like it should be fairly easy to template. > The only thing I'm not sure on is how to handle the incrementing > nature of the param lines... > I'd like to keep the number of resource params as light as possible, > as there's no way I can expose all the possible config lines, so I'm > thinking maybe use an array for each 'set' of config lines, e.g. > 'wrapper.java.classpath' and 'wrapper.java.additional'... But then how > do I handle over-riding pre-existing config values? Is there a better > way to handle this file? I think you rather mean - how to *keep* existing values and only manage certain entries of the array. I fear that won't work. And I concur that arrays would be a good choice here. Perhaps an alternative API that takes an index/value hash instead would be useful to some, but seems like abysimal mileage to me. I haven't dabbled in augeasproviders yet (which is a shame), but imagine that it would be a good approach for both files (unless of course the latter can just be templated). Cheers, Felix -- 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/53C5948A.3080707%40Alumni.TU-Berlin.de. For more options, visit https://groups.google.com/d/optout.