7

I have a couple Splunk servers in house which I manage part of the configuration through puppet. These are residing on CentOS 6 boxes.

My definition is set up as

file{ "/opt/splunk/etc/apps": recurse => true, purge => true, force => true, source => "puppet:///modules/splunk/$hostname/apps", ensure => present, mode => 755, owner => splunk, group => splunk, notify => Service["splunk"] } 

This works well, but I'd like to exclude the saved searches file at /opt/splunk/etc/apps/myapp/local/savedsearches.conf from being overwritten and / or automatically update the copy contained within Puppet with the version kept on the local server.

Is there a ready way to do this? I looked over the documentation and didn't see anything.

2
  • Fixed what I believe was a typo. Correct? Commented May 11, 2012 at 15:06
  • I figured it had to be a typo, but just wanted to make sure I didn't do something stupid. :) Commented May 11, 2012 at 16:00

1 Answer 1

10

You can add ignore => "savedsearches.conf" to the file stanza to exclude it from operations on the managed directory.

file{ "/opt/splunk/etc/apps": recurse => true, purge => true, force => true, source => "puppet:///modules/splunk/$hostname/apps", ensure => present, mode => 755, owner => splunk, group => splunk, ignore => "savedsearches.conf" notify => Service["splunk"] } 
1

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.