From c323ef50d2adfa0ff00c9e66f8eb1f3406a6f3ce Mon Sep 17 00:00:00 2001 From: Ossi Herrala Date: Wed, 11 Mar 2015 12:13:32 +0000 Subject: [PATCH] logwatch: Services are now configurable via Puppet. --- logwatch/manifests/init.pp | 4 ++++ logwatch/templates/logwatch.conf.erb | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/logwatch/manifests/init.pp b/logwatch/manifests/init.pp index 40f69ff..81063a7 100644 --- a/logwatch/manifests/init.pp +++ b/logwatch/manifests/init.pp @@ -12,6 +12,10 @@ # Logwatch detail level for report. Valid values are # from 0 to 10. # +# $logwatch_services: +# Array of logwatch services to enable and disable. For example +# [ "-pam_unix" ] to turn off pam_unix service. +# class logwatch { case $::kernel { diff --git a/logwatch/templates/logwatch.conf.erb b/logwatch/templates/logwatch.conf.erb index d3b501a..86d5b01 100644 --- a/logwatch/templates/logwatch.conf.erb +++ b/logwatch/templates/logwatch.conf.erb @@ -8,3 +8,8 @@ MailFrom = <%= @logwatch_mailfrom %> <% if @logwatch_level -%> Detail = <%= @logwatch_level %> <% end -%> +<% if @logwatch_services -%> +<% @logwatch_services.each do |val| -%> +Service = <%= val %> +<% end -%> +<% end -%>