mirror of
https://github.com/khuedoan/homelab.git
synced 2025-01-24 01:36:10 +07:00
feat(metal): enable automatic upgrade for Rocky Linux
This commit is contained in:
parent
12e5a55bb9
commit
a515b1eaac
@ -2,6 +2,7 @@
|
||||
hosts: metal
|
||||
roles:
|
||||
- k3s
|
||||
- automatic_upgrade
|
||||
|
||||
- name: Create some basic config
|
||||
hosts: localhost
|
||||
|
3
metal/roles/automatic_upgrade/files/automatic.conf
Normal file
3
metal/roles/automatic_upgrade/files/automatic.conf
Normal file
@ -0,0 +1,3 @@
|
||||
[commands]
|
||||
upgrade_type = default
|
||||
apply_updates = yes
|
17
metal/roles/automatic_upgrade/tasks/main.yml
Normal file
17
metal/roles/automatic_upgrade/tasks/main.yml
Normal 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
|
Loading…
Reference in New Issue
Block a user