From 05880bc97b7dd5dfd9e6fa92b3324b1b287ba988 Mon Sep 17 00:00:00 2001
From: Andreas Kempe <kempe@lysator.liu.se>
Date: Fri, 12 May 2023 17:12:22 +0200
Subject: [PATCH] cronmailer: install msmtp-mta on Debian

---
 manifests/cronmailer.pp | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/manifests/cronmailer.pp b/manifests/cronmailer.pp
index 96694da..171dc11 100644
--- a/manifests/cronmailer.pp
+++ b/manifests/cronmailer.pp
@@ -16,7 +16,15 @@ class profiles::cronmailer {
   file_line { 'create root alias':
     ensure => present,
     path   => '/etc/aliases',
-    line   => "root: root+${hostname}@lysator.liu.se",
+    line   => "root: root+${::hostname}@lysator.liu.se",
     match  => '^root:',
   }
+
+  case $facts['os']['family'] {
+    'Debian': {
+      package { 'msmtp-mta':
+        ensure => installed,
+      }
+    }
+  }
 }
-- 
GitLab