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 -%>