agaric-coop/box/provisioning/roles/geerlingguy.security/tasks/autoupdate-RedHat.yml

14 lines
415 B
YAML
Raw Permalink Normal View History

---
- name: Install yum-cron.
yum: name=yum-cron state=present
- name: Ensure yum-cron is running and enabled on boot.
service: name=yum-cron state=started enabled=yes
- name: Configure autoupdates (RHEL 7).
lineinfile:
dest: "/etc/yum/yum-cron.conf"
regexp: '^apply_updates = .+'
line: 'apply_updates = yes'
when: security_autoupdate_enabled and ansible_distribution_major_version | int == 7