puppet-splunk
puppet-splunk copied to clipboard
purge_outputs => true doesn't remove groups completely
Affected Puppet, Ruby, OS and module versions/distributions
- Puppet: 4.10.12
- Ruby:2.1.9p490
- Distribution: CentOS
- Module version: 7.3.0
How to reproduce (e.g Puppet code you use)
Configure a forwarder_output such as:
[tcpout:splunk-index-01.example.com_9997]
server=splunk-index-01.example.com:9997
Then try to change to a different group name using purge_outputs to remove the old one:
class { '::splunk::forwarder':
purge_outputs => true,
}
What are you seeing
The server= line is removed, but the group heading remains.
What behaviour did you expect instead
Purge_outputs should delete the group name as well as the individual entry if no other entires exist for that group.
Output log
Notice: /Stage[main]/Splunk::Params/Splunkforwarder_output[Purge system/local default/defaultGroup]/ensure: removed
Notice: /Stage[main]/Splunk::Params/Splunkforwarder_output[Purge system/local tcpout:splunk-index-01.example.com_9997/server]/ensure: removed
Notice: /Stage[main]/Splunk::Params/Splunkforwarder_output[Purge system/local tcpout:default-group/server]/ensure: removed
Notice: /Stage[main]/Splunk::Forwarder::Config/Splunkforwarder_output[tcpout_defaultgroup]/ensure: created
Info: /Stage[main]/Splunk::Forwarder::Config/Splunkforwarder_output[tcpout_defaultgroup]: Scheduling refresh of Class[Splunk::Forwarder::Service]
Notice: /Stage[main]/Splunk::Forwarder::Config/Splunkforwarder_output[defaultgroup_server]/ensure: created
Info: /Stage[main]/Splunk::Forwarder::Config/Splunkforwarder_output[defaultgroup_server]: Scheduling refresh of Class[Splunk::Forwarder::Service]