From d42b2989b8f0efeb3b8fe58c41f6228cb907c880 Mon Sep 17 00:00:00 2001 From: Ossi Salmi Date: Tue, 26 Mar 2013 13:43:08 +0200 Subject: [PATCH] Added variable for setting logwatch mail recipient --- logwatch/manifests/init.pp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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"], + } + } + }