feat(metal): enable automatic upgrade for Rocky Linux

This commit is contained in:
Khue Doan 2022-02-25 01:31:52 +07:00
parent 12e5a55bb9
commit a515b1eaac
3 changed files with 21 additions and 0 deletions

View File

@ -2,6 +2,7 @@
hosts: metal hosts: metal
roles: roles:
- k3s - k3s
- automatic_upgrade
- name: Create some basic config - name: Create some basic config
hosts: localhost hosts: localhost

View File

@ -0,0 +1,3 @@
[commands]
upgrade_type = default
apply_updates = yes

View File

@ -0,0 +1,17 @@
- name: Install packages for automatic upgrade
dnf:
name:
- dnf-automatic
- dnf-utils
- name: Copy automatic upgrade config file
copy:
src: automatic.conf
dest: /etc/dnf/automatic.conf
mode: 0644
- name: Enable automatic upgrade service
systemd:
name: dnf-automatic.timer
state: started
enabled: true