Open oniGino opened 2 years ago
After looking through the code I think the issue might be inside ini_settings module, where it appears to not return any value when it encounters an empty section on scan, I'm not sure the best way to fix this issue
We at @athenahealth have run into something similar, but with outputs.conf
. We’re gonna see about sprucing this all up, since we need the functionality to work as intended.
One could argue that it's impossible to even set a section without any values with this module respectively with puppetlabs-inifile
, so it does make sense that it doesn't get picked up when removing. So I'm assuming you already had a config running and then started to manage that with Puppet? Or added some inputs by hand?
So there's multiple workarounds:
Apply this first:
@splunkforwarder_input { 'temp':
section => 'monitor:///opt/acton/var/log/streamer/streamer.log',
setting => 'temp',
value => 'to_delete',
}
Then remove the @splunkforwarder_input
resource and run puppet again.
See https://forge.puppet.com/modules/puppetlabs/stdlib/4.9.1/types to remove the given section.
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
@splunkforwarder_input
entry for a fileWhat are you seeing
[section]
will be left behind but its content will be removed exampleWhat behaviour did you expect instead
we are running
Should remove all inputs not defined