Hi, all.

I'm having a hell of a time trying to figure out why the Puppet Labs' 
Splunk module (https://forge.puppetlabs.com/puppetlabs/splunk) seemingly 
refuses to work with the ini_setting purge functionality.

Inside the module, it's got some code to purge content from the two managed 
INI files (inputs.conf and outputs.conf):

  # If the purge parameters have been set, remove all unmanaged entries from
  # the inputs.conf and outputs.conf files, respectively.
  if $purge_inputs  {
    resources { 'splunkforwarder_input':  purge => true; }
  }
  if $purge_outputs {
    resources { 'splunkforwarder_output': purge => true; }
  }

I have both $purge_inputs and $purge_outputs set to true.

When any of the splunkforwarder_output or splunkforwarder_input resouces 
change, the updated content gets written into the appropriate file, but the 
previous values stick around, which is bad:

# cat outputs.conf 

[default]
defaultGroup=splunk_9997

[tcpout:splunk_9997]
server=splunk:9997

[tcpout:splunk_9999]
server=splunk:9999

[tcpout:_]
server=:

Has anybody else experienced this?  It's behaving as if the purge isn't 
even active.  But I've verified that my inifile module is up to date and 
does indeed support purging.  I've also verified that the 
splunkforwarder_output and splunkforwarder_input providers implement the 
self.file_path method, which is a prerequisite to purging working.

I'm not even quite sure where to start troubleshooting this, as everything 
appears to be by-the-book correct -- it's just that the purging bits are 
being (apparently) ignored.

-- 
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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/dc679d79-9ce7-4fcb-8e28-f4ebdc920ae5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to