diff manifests/templates.pp @ 376:752c0861a7c3

Fix tailing output in update check "-2" means "last two lines". We want "not the first two lines" because the first two are the metadata date and a blank line. This should stop the emails that are just the metadata date!
author IBBoard <dev@ibboard.co.uk>
date Sat, 25 Sep 2021 14:59:33 +0100
parents 5f4fc00f8189
children 18765f598232
line wrap: on
line diff
--- a/manifests/templates.pp	Sat Jul 17 15:12:13 2021 +0100
+++ b/manifests/templates.pp	Sat Sep 25 14:59:33 2021 +0100
@@ -840,7 +840,7 @@
 	}
 	# Notify of available updates
 	cron { 'check-yum-updates':
-		command => '/usr/bin/yum check-update | tail -2 | grep -Ev "^ \* [[:alnum:]-]+: [[:alnum:]\.]+$"',
+		command => '/usr/bin/yum check-update | tail -n +2 | grep -Ev "^ \* [[:alnum:]-]+: [[:alnum:]\.]+$"',
 		hour => '4',
 		minute => '30',
 		weekday => '0-6/3', #Sunday, Wednesday and Saturday morning