Skip to content

Instantly share code, notes, and snippets.

@breenie
Last active July 19, 2019 10:05
Show Gist options
  • Select an option

  • Save breenie/89d2edc9acd92a3197122898a2cf0fa2 to your computer and use it in GitHub Desktop.

Select an option

Save breenie/89d2edc9acd92a3197122898a2cf0fa2 to your computer and use it in GitHub Desktop.
yum-cron security only cloud-config example
#cloud-config
packages:
- yum-cron
runcmd:
- yum clean all
- sed -ie 's/update_cmd = default/update_cmd = security/' /etc/yum/yum-cron.conf
- sed -ie 's/update_cmd = default/update_cmd = security/' /etc/yum/yum-cron-hourly.conf
- sed -ie 's/update_messages = no/update_messages = yes/' /etc/yum/yum-cron.conf
- sed -ie 's/update_messages = no/update_messages = yes/' /etc/yum/yum-cron-hourly.conf
- sed -ie 's/download_updates = no/download_updates = yes/' /etc/yum/yum-cron.conf
- sed -ie 's/download_updates = no/download_updates = yes/' /etc/yum/yum-cron-hourly.conf
- sed -ie 's/apply_updates = no/apply_updates = yes/' /etc/yum/yum-cron.conf
- sed -ie 's/apply_updates = no/apply_updates = yes/' /etc/yum/yum-cron-hourly.conf
- chkconfig yum-cron on
- service yum-cron start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment