electrical/puppet-logstash — pull request #64 by jkoppe (2013-07-24 18:52:21+00:00)
Title: force removal of directories if ensure is absent

Without force=>true, this is what happens on a node which was ensure => present but has been changed to ensure => absent.

Jul 24 13:29:21 jid-dbs1 puppet-agent[29407]: (/Stage[main]/Logstash::Config/Logstash::Configdir[agent]/File[/etc/logstash/agent/sincedb]) Not removing directory; use 'force' to override
Jul 24 13:29:21 jid-dbs1 puppet-agent[29407]: (/Stage[main]/Logstash::Config/Logstash::Configdir[agent]/File[/etc/logstash/agent/sincedb]/ensure) removed
Jul 24 13:29:21 jid-dbs1 puppet-agent[29407]: (/Stage[main]/Logstash::Config/Logstash::Configdir[agent]/File[/etc/logstash/agent/config]) Not removing directory; use 'force' to override
Jul 24 13:29:21 jid-dbs1 puppet-agent[29407]: (/Stage[main]/Logstash::Config/Logstash::Configdir[agent]/File[/etc/logstash/agent/config]/ensure) removed
Jul 24 13:29:43 jid-dbs1 puppet-agent[29407]: Finished catalog run in 52.71 seconds

After setting these two file resources to force => true, here's what happens:

notice: /Stage[main]/Logstash::Config/Logstash::Configdir[agent]/File[/etc/logstash/agent/sincedb]/ensure: removed
notice: /Stage[main]/Logstash::Config/Logstash::Configdir[agent]/File[/etc/logstash/agent/config]/ensure: removed
notice: Finished catalog run in 60.36 seconds

I'd prefer to remove the configuration and sincedb files.