Enable Fedora to use dnf-automatic to install os patches

This commit is contained in:
Jason Rothstein 2020-08-16 13:43:17 -05:00
parent f0c8c9849e
commit adc37067c7

View File

@ -28,6 +28,30 @@
autoclean: 'yes' autoclean: 'yes'
autoremove: 'yes' autoremove: 'yes'
upgrade: 'dist' upgrade: 'dist'
- name: 'Ensure dnf-automatic installation'
when:
- ansible_system == 'Linux'
- ansible_distribution == 'Fedora'
- ansible_distribution_major_version >= 21
package:
name:
- 'dnf-automatic'
state: 'present'
notify:
- 'ensure_os_patch.package_facts'
- 'ensure_os_patch.service_facts'
- name: 'Ensure dnf-automatic runs'
when:
- ansible_system == 'Linux'
- ansible_distribution == 'Fedora'
- ansible_distribution_major_version >= 21
service:
enabled: 'yes'
name: 'dnf-automatic-install.timer'
state: 'running'
notify:
- 'ensure_os_patch.package_facts'
- 'ensure_os_patch.service_facts'
- name: 'flush handlers' - name: 'flush handlers'
meta: 'flush_handlers' meta: 'flush_handlers'