From d24ca3314fadd7836ed0d6345359eb7ccfad6419 Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Sat, 27 Jul 2013 13:42:54 -0400 Subject: Parametrize unattended-upgrades mail recipient --- manifests/unattended_upgrades.pp | 1 + templates/50unattended-upgrades.erb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/manifests/unattended_upgrades.pp b/manifests/unattended_upgrades.pp index b63b483..7e17333 100644 --- a/manifests/unattended_upgrades.pp +++ b/manifests/unattended_upgrades.pp @@ -1,6 +1,7 @@ class apt::unattended_upgrades ( $config_content = undef, $mailonlyonerror = true, + $mail_recipient = 'root', ) { package { 'unattended-upgrades': diff --git a/templates/50unattended-upgrades.erb b/templates/50unattended-upgrades.erb index 0ba0d7e..41bac87 100644 --- a/templates/50unattended-upgrades.erb +++ b/templates/50unattended-upgrades.erb @@ -20,7 +20,7 @@ APT::Periodic::Update-Package-Lists "1"; APT::Periodic::Download-Upgradeable-Packages "1"; APT::Periodic::Unattended-Upgrade "1"; -Unattended-Upgrade::Mail "root"; +Unattended-Upgrade::Mail "<%= mail_recipient -%>"; <% if mailonlyonerror -%> Unattended-Upgrade::MailOnlyOnError "true"; <% end -%> -- cgit v1.2.3