Installs and manages yum-cron
.
By default this role installs security updates every hour, and checks for but does not install normal updates daily. For updates that aren't security flaws, I prefer to delay upgrading until I'm available to fix anything that might go wrong.
Since the daily update level only checks but doesn't download, the notification message will say "empty transaction", meaning it found an update, but didn't do anything about it.
Tested on CentOS 7. Will likely work on equivalent RHEL or RHEL derivatives.
You'll likely want to change the default yum_cron_email_to
variable to an email address
that you actually monitor.
It's also possible to define special yum settings to for example exclude some packages from auto-updating:
#yum_cron_hourly_base_options: # - "exclude=java*,kernel*" #yum_cron_daily_base_options: "{{ yum_cron_hourly_base_options }}"
- hosts: servers
roles:
- { role: yum-cron, yum_cron_email_to: support@rockclimbing.com, tags: ['yum_cron'] }
MIT
Jeff Widman jeff@jeffwidman.com Johan Guldmyr jguldmyr@csc.fi