logwatch: Added support for setting detail level.
This commit is contained in:
parent
1bf60c5bdc
commit
49073dcc57
2 changed files with 19 additions and 10 deletions
|
@ -2,9 +2,13 @@
|
||||||
#
|
#
|
||||||
# === Global variables
|
# === Global variables
|
||||||
#
|
#
|
||||||
# $logwatch_mailto
|
# $logwatch_mailto:
|
||||||
# Logwatch mail recipient.
|
# Logwatch mail recipient.
|
||||||
#
|
#
|
||||||
|
# $logwatch_level:
|
||||||
|
# Logwatch detail level for report. Valid values are
|
||||||
|
# from 0 to 10.
|
||||||
|
#
|
||||||
class logwatch {
|
class logwatch {
|
||||||
|
|
||||||
case $::kernel {
|
case $::kernel {
|
||||||
|
@ -18,15 +22,13 @@ class logwatch {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if $logwatch_mailto {
|
|
||||||
file { "/etc/logwatch/conf/logwatch.conf":
|
file { "/etc/logwatch/conf/logwatch.conf":
|
||||||
ensure => present,
|
ensure => present,
|
||||||
|
content => template("logwatch/logwatch.conf.erb"),
|
||||||
mode => "0644",
|
mode => "0644",
|
||||||
owner => "root",
|
owner => "root",
|
||||||
group => "root",
|
group => "root",
|
||||||
content => "MailTo = ${logwatch_mailto}\n",
|
|
||||||
require => Package["logwatch"],
|
require => Package["logwatch"],
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
7
logwatch/templates/logwatch.conf.erb
Normal file
7
logwatch/templates/logwatch.conf.erb
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# autogenerated by puppet
|
||||||
|
<% if @logwatch_mailto -%>
|
||||||
|
MailTo = <%= @logwatch_mailto %>
|
||||||
|
<% end -%>
|
||||||
|
<% if @logwatch_level -%>
|
||||||
|
Detail = <%= @logwatch_level %>
|
||||||
|
<% end -%>
|
Loading…
Add table
Reference in a new issue