pcfens/puppet-filebeat

service_enable = true, even when package is set to absent

rlueckl opened this issue · 2 comments

This is just a minor inconvenience, but I thought I'd open a ticket for it.

When setting $package_ensure to absent (https://github.com/pcfens/puppet-filebeat/blob/master/manifests/init.pp#L131) the module tries to make sure that as much as possible is removed. BUT! The default value of $service_enable is still true, so it tries to enable the service even though everything else is to be removed. Of course this doesn't work.

My suggestion: if $package_ensure is set to absent, $service_enable should automatically be set to false also. Maybe this could be added to https://github.com/pcfens/puppet-filebeat/blob/master/manifests/init.pp#L117

Current workaround is to set both manually when calling the class.

Looks like #254 addressed this issue, @rlueckl can this issue be closed?

Yes, looks like it. Thanks!