diff --git a/logwatch/manifests/init.pp b/logwatch/manifests/init.pp index 0dbca0b..05e4341 100644 --- a/logwatch/manifests/init.pp +++ b/logwatch/manifests/init.pp @@ -1,5 +1,10 @@ # Install logwatch. # +# === Global variables +# +# $logwatch_mailto +# Logwatch mail recipient. +# class logwatch { case $::kernel { @@ -13,4 +18,15 @@ class logwatch { } } + if $logwatch_mailto { + file { "/etc/logwatch/conf/logwatch.conf": + ensure => present, + mode => "0644", + owner => "root", + group => "root", + content => "MailTo = ${logwatch_mailto}\n", + require => Package["logwatch"], + } + } + }