I started to look into this for JBoss - it uses an xml config file but the app itself makes changes to the file when you deploy an application (in domain mode) - so using the normal file resource in puppet simply wouldn't work.
I found the Augeas documentation to be rather hard to get into (or even find). I was expecting there to be a straightforward (xpath-style?) lens for editing xml files but couldn't find anything. There wasn't a JBoss AS lens either, which again was surprising since JBoss is a RedHat product and it looks like Augeas is sponsored by RedHat. In the end I found a workaround for JBoss so I can just use normal puppet File type, though my XPath thoughts did make me wonder whether I ought to actually be looking for an xpath type/ resource/ plugin for puppet (sorry for the incorrect terminology). Augeas actually uses a syntax that looks a lot like xpath... On Monday, January 7, 2013 11:34:16 PM UTC, Roman Shaposhnik wrote: > > On Mon, Jan 7, 2013 at 1:24 PM, Schofield <dbsch...@gmail.com<javascript:>> > wrote: > > I would like to use puppet classes to inject and/or replace xml elements > > into an existing xml configuration file. This seems to me to be a > common > > problem already solved. Can anyone suggest the easiest way to do this? > > Well, the tool du jour for that would be augeas. That said, if the config > file actually happens to be under your manifest control fully (even though > different resources are depositing bits and pieces of configuration info > into it) you could go with virtual resource template and sed. > > Thanks, > Roman. > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/x_JMrlOwZNIJ. 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.