Hi,
I'm fairly new to puppet and am working my way through various approaches
to problems - probably doing them in all the worst possible ways...
One thing I'm currently trying to do is configure an application using
heira and puppet. The application comes with a selection of default
template configuration files which I'm using Augeas in Puppet to configure
with the valies from heira as required.
Essentially my class is doing the following:
file{'config.file':
source=> "file://src/template.xml",
path => "$destfolder/template.xml"
} ->
augeas {"config.file_aug":
lens => "xml.lns",
incl => "$destfolder/template.xml",
changes => [ "setm... "]
}
Now, this is working... but what of course what's happening is that every
time puppet runs, the first file resource replaces the template.xml with
the original copy, then the augeas re-edits it to match the file that was
just replaced.
I could make sure the file resource doesn't replace the new one with
'replace -> false', but then if unwanted changes occur, we'd never know.
How can I combine a the required augeas changes to the xml template file
before it's checked?
Should I use puppet to construct the new version in a temporary folder, and
the do a final file resource to compare the constructed version with the
live version?
Thanks in advance,
Dave
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/c6ff68b8-ccb8-4ad7-8df5-52d4cbc06bb2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.