comparison 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
comparison
equal deleted inserted replaced
375:a8a7b2b343b5 376:752c0861a7c3
838 minute => '20', 838 minute => '20',
839 weekday => '0-6/3', #Sunday, Wednesday and Saturday morning 839 weekday => '0-6/3', #Sunday, Wednesday and Saturday morning
840 } 840 }
841 # Notify of available updates 841 # Notify of available updates
842 cron { 'check-yum-updates': 842 cron { 'check-yum-updates':
843 command => '/usr/bin/yum check-update | tail -2 | grep -Ev "^ \* [[:alnum:]-]+: [[:alnum:]\.]+$"', 843 command => '/usr/bin/yum check-update | tail -n +2 | grep -Ev "^ \* [[:alnum:]-]+: [[:alnum:]\.]+$"',
844 hour => '4', 844 hour => '4',
845 minute => '30', 845 minute => '30',
846 weekday => '0-6/3', #Sunday, Wednesday and Saturday morning 846 weekday => '0-6/3', #Sunday, Wednesday and Saturday morning
847 } 847 }
848 # And check whether anything needs restarting 848 # And check whether anything needs restarting