From 98da1916587c6389bf81342e9380707ee69b59cb Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Sat, 4 Jan 2020 12:01:38 +0100 Subject: [PATCH] Fixed mail for check disk space --- roles/common/templates/etc/cron.hourly/check-disk-space.sh.j2 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/roles/common/templates/etc/cron.hourly/check-disk-space.sh.j2 b/roles/common/templates/etc/cron.hourly/check-disk-space.sh.j2 index b9f1648..903e08c 100644 --- a/roles/common/templates/etc/cron.hourly/check-disk-space.sh.j2 +++ b/roles/common/templates/etc/cron.hourly/check-disk-space.sh.j2 @@ -3,7 +3,7 @@ # Check disk space CURRENT=$(df / --output=pcent | tail --lines=1 | cut --delimiter='%' --field=1) THRESHOLD=90 -ADMIN="root@{{ ansible_domain }}" +ADMIN="{{ admin_mail }}" SUBJECT="[Disk Space Alert] The free space on {{ ansible_fqdn }} is critically low" MESSAGE= @@ -12,4 +12,3 @@ if [ "$CURRENT" -gt "$THRESHOLD" ]; then Your root partition remaining free space is critically low. Used: $CURRENT% EOF fi -