Hi All, For most of the config files we manage via our Puppet setup, we either serve flat files or use templates and dashboard parameters and Facts to dynamically create the config file. However, in some cases we are not comfortable with either of these methods due to the possibility of small but numerous variances across different versions of operating systems. Also there is always the worry that a package update from the OS vendor will make changes you did not forsee. Managing the file with a File resource or template in Puppet would stomp out these vendor changes.
Currently in such cases, we use diff-style patches and use the 'patch' command in our RPMs to apply custom changes to Red Hat's baseline file. This is flexible and fairly safe. However we've been transitioning from using custom RPMs in a Kickstarted environment, to bootstrapping our systems using Kickstart and then using Puppet wherever possible. I'd like to manage even these tricky files with Puppet, but I'm not sure the best way to handle it. I don't want to use a File resource or templates, as we do for most everything else. I considered augeas and have played around with it a bit, but in so many cases it is clumsy and a little dangerous, i.e. items in config files are often referenced by file line number or some other possibly-volatile key. This uncertainty with augeas sorta defeats the whole purpose of avoiding File and templates. Line numbers can change from one version of the file to the next, and if I hardcode changes to specific line numbers, that seems like a recipe for incorrect config files in the future. Anyone have a good idea for how to apply Diff-style patches using Puppet? I was thinking a File and an Exec could get it done, the former being the patch file, the latter being a command to patch the file. But in this case, how to keep from download the patch file on every Puppet run, whether or not we use it? Hope I've been clear on my questioning, and thanks in advance! -Kent -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.