From 5592c23c444bdaa87594a90f2d76d5c32f49c9e7 Mon Sep 17 00:00:00 2001 From: Tobias Date: Sat, 6 Jun 2026 14:56:50 +0100 Subject: [PATCH] Add playbooks/automatic_security_upgrades.yml --- playbooks/automatic_security_upgrades.yml | 30 +++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 playbooks/automatic_security_upgrades.yml diff --git a/playbooks/automatic_security_upgrades.yml b/playbooks/automatic_security_upgrades.yml new file mode 100644 index 0000000..dccda96 --- /dev/null +++ b/playbooks/automatic_security_upgrades.yml @@ -0,0 +1,30 @@ +- name: install and configure automatic security updates + hosts: wireguard + become: true + + tasks: + - name: install dnf-automatic + dnf: + name: + - dnf-automatic + state: present + + - name: edit update type to security only + ansible.builtin.ini_file: + path: /etc/dnf/automatic.conf + section: commands + option: upgrade_type + value: security + + - name: allow automatic installation of updates + ansible.builtin.ini_file: + path: /etc/dnf/automatic.conf + section: commands + option: apply_updates + value: "yes" + + - name: start and enable dnf-automatic install timer + ansible.builtin.systemd: + name: dnf-automatic-install.timer + enabled: true + state: started \ No newline at end of file