From 72ee7f2fce5efbc62d9a99d268765f433baa025a Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Sat, 13 Jan 2024 02:33:59 +0100 Subject: [PATCH] Added more text because it seems to solve a recieving problem --- roles/systemd-notifier-email/tasks/main.yml | 1 + .../templates/systemd-notifier-email.sh.j2 | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/roles/systemd-notifier-email/tasks/main.yml b/roles/systemd-notifier-email/tasks/main.yml index 5ddd0054..95411c90 100644 --- a/roles/systemd-notifier-email/tasks/main.yml +++ b/roles/systemd-notifier-email/tasks/main.yml @@ -6,6 +6,7 @@ template: src: "msmtprc.conf.j2" dest: "/root/.msmtprc" + mode: 600 when: run_once_systemd_notifier_email is not defined - name: "create {{systemd_notifier_email_folder}}" diff --git a/roles/systemd-notifier-email/templates/systemd-notifier-email.sh.j2 b/roles/systemd-notifier-email/templates/systemd-notifier-email.sh.j2 index aa45863f..b99811be 100644 --- a/roles/systemd-notifier-email/templates/systemd-notifier-email.sh.j2 +++ b/roles/systemd-notifier-email/templates/systemd-notifier-email.sh.j2 @@ -7,5 +7,9 @@ Subject: $1 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 -$(systemctl status --full "$1") +A problem with the service $1 occured: + +$(systemctl status --full "$1" | head -n 30) + + ERRMAIL