feat: add option to set installonly_limit in dnf config

This commit is contained in:
Robert Kaussow 2024-02-15 13:47:14 +01:00
parent 3b5b1086cd
commit 947920b1fa
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
3 changed files with 5 additions and 3 deletions

View File

@ -29,3 +29,5 @@ packages_uninstall:
packages_uninstall_extra: []
packages_upgrade_enabled: False
packages_dnf_installonly_limit: 2

View File

@ -1,12 +1,12 @@
---
- block:
- name: Uninstall pre packages
- name: Uninstall prerequisite packages
package:
name: "{{ item }}"
state: absent
loop: "{{ packages_uninstall_pre + packages_uninstall_pre_extra }}"
- name: Adjust packages config file
- name: Adjust dnf config file
template:
src: etc/dnf/dnf.conf.j2
dest: /etc/dnf/dnf.conf

View File

@ -2,7 +2,7 @@
{{ ansible_managed | comment }}
[main]
gpgcheck=1
installonly_limit=3
installonly_limit={{ packages_dnf_installonly_limit }}
clean_requirements_on_remove=True
best=True
skip_if_unavailable=False