2021-04-05 05:18:41 +00:00
|
|
|
---
|
2023-08-31 01:26:56 +00:00
|
|
|
- name: Raise max_parallel_downloads to 20
|
|
|
|
become: true
|
|
|
|
ansible.builtin.lineinfile:
|
2021-04-05 05:18:41 +00:00
|
|
|
path: /etc/dnf/dnf.conf
|
|
|
|
regexp: "^max_parallel_downloads.="
|
|
|
|
line: "max_parallel_downloads=20"
|
|
|
|
|
2023-08-31 01:26:56 +00:00
|
|
|
- name: Prepare automatic upgrade w/ dnf-automatic
|
|
|
|
block:
|
|
|
|
- name: Install dnf-automatic
|
|
|
|
become: true
|
|
|
|
ansible.builtin.package:
|
|
|
|
name: dnf-automatic
|
|
|
|
state: present
|
2021-04-05 05:18:41 +00:00
|
|
|
|
2023-08-31 01:26:56 +00:00
|
|
|
- name: Configure dnf-automatic
|
|
|
|
become: true
|
|
|
|
ansible.builtin.lineinfile:
|
|
|
|
path: /etc/dnf/automatic.conf
|
|
|
|
state: present
|
|
|
|
regexp: "{{ item.regexp }}"
|
|
|
|
line: "{{ item.line }}"
|
|
|
|
with_items:
|
|
|
|
- {regexp: '^upgrade_type.=', line: 'upgrade_type = default'}
|
|
|
|
- {regexp: '^emit_via.=', line: 'emit_via = stdio,motd'}
|
|
|
|
- {regexp: '^apply_updates.=', line: 'apply_updates = no'}
|
|
|
|
- {regexp: '^download_updates.=', line: 'download_updates = yes'}
|
2021-04-05 05:18:41 +00:00
|
|
|
|
2023-08-31 01:26:56 +00:00
|
|
|
- name: Enable dnf-automatic timer
|
|
|
|
become: true
|
|
|
|
ansible.builtin.systemd:
|
|
|
|
name: dnf-automatic.timer
|
|
|
|
state: started
|
|
|
|
enabled: true
|
|
|
|
when:
|
|
|
|
- auto_update is defined
|
|
|
|
- auto_update | bool
|