Add playbooks/dnf-automatic.yml
This commit is contained in:
30
playbooks/dnf-automatic.yml
Normal file
30
playbooks/dnf-automatic.yml
Normal file
@@ -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
|
||||||
Reference in New Issue
Block a user