--- - name: raise max_parallel_downloads to 20 lineinfile: path: /etc/dnf/dnf.conf regexp: "^max_parallel_downloads.=" line: "max_parallel_downloads=20" - name: install dnf-automatic package: name: dnf-automatic state: present - name: configure dnf-automatic become: true lineinfile: path: /etc/dnf/automatic.conf state: present regexp: "{{ item.regexp }}" line: "{{ item.line }}" with_items: - { regexp: '^upgrade_type.=', line: 'upgrade_type = security' } - { regexp: '^emit_via.=', line: 'emit_via = stdio,motd' } - { regexp: '^apply_updates.=', line: 'apply_updates = yes' } - name: enable dnf-automatic timer systemd: name: dnf-automatic.timer state: started enabled: yes