Mercurial > repos > other > Puppet
comparison manifests/templates.pp @ 378:d539c21143bb
Get more specific with extracting Yum update list
The regex would still return some additional values or blank lines.
The new regex has been checked against both "yum check-update" and
"yum list" and matches all currently installed version strings
(including weird Git ones)
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Wed, 29 Sep 2021 20:25:44 +0100 |
parents | 18765f598232 |
children | 63adae1a374a |
comparison
equal
deleted
inserted
replaced
377:18765f598232 | 378:d539c21143bb |
---|---|
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 -n +2 | grep -Ev "^ \* [[:alnum:]-]+: [[:alnum:]\.]+$"', | 843 command => '/usr/bin/yum check-update | grep -E "^[^ ]+ +[0-9a-z_\.-]+ +[^ ]+$"', |
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 |