From e7aaff3a790d0cc1b2688085b2d6d9824bb2cd1c Mon Sep 17 00:00:00 2001 From: Tobias Date: Sun, 14 Jun 2026 21:05:50 +0000 Subject: [PATCH] Add playbooks/dnf-automatic.yml --- playbooks/dnf-automatic.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 playbooks/dnf-automatic.yml diff --git a/playbooks/dnf-automatic.yml b/playbooks/dnf-automatic.yml new file mode 100644 index 0000000..ef8e79a --- /dev/null +++ b/playbooks/dnf-automatic.yml @@ -0,0 +1,30 @@ +- name: install and configure automatic security updates + hosts: alma + 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