Not really. There are a couple ways to handle this:
1) Make use of includes. Have the puppet-managed file include the app-managed
file. Of course, this requires the app to be friendly to this kind of setup.
2) Add "replace=>false" so that Puppet will create the file but never update it
if it exists. Of course, that breaks when you have updates that you really do
need puppet to apply.
3) Install/use augeas. You'll probably need to write an appropriate lens, but
if done correctly, this is very robust.
4) Use an exec to modify the file in-place. This is fugly.
5) Use an exec with the application's CLI to to have the application make the
updates. Better than 4, but still not exactly beautiful.
On Jan 27, 2011, at 8:26 AM, Mohamed Lrhazi wrote:
> I have a file that is part of a software I am installing via puppet...
> the file is constructed from a template, as it has a couple of fields
> I wanna be able to change in the future.
> The file is updated by the app itself, upon restart, which changes
> just one field, in a key=val line...the result is that puppet rebuilds
> the file, and becuase of depnedecy, restarts the app at each run.
>
> Can I somehow say ignore that one line?
>
> file { "splunk_outputs":
> owner => splunk,
> group => splunk,
> mode => 644,
> require => [Package["splunk"]],
> path => "/opt/splunk/etc/system/local/outputs.conf",
> content => template("gu_splunk/outputs.conf.erb"), #but please
> ignore line starting with: sslPassword=
> notify => Exec["restart"],
> }
>
> Thanks a lot.
> Mohamed.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.