augtool> print /files/etc/dnf/dnf.conf
/files/etc/dnf/dnf.conf
/files/etc/dnf/dnf.conf/#comment = "see `man dnf.conf` for defaults and possible options"
/files/etc/dnf/dnf.conf/main
/files/etc/dnf/dnf.conf/main/gpgcheck = "True"
/files/etc/dnf/dnf.conf/main/installonly_limit = "3"
/files/etc/dnf/dnf.conf/main/clean_requirements_on_remove = "True"
/files/etc/dnf/dnf.conf/main/best = "False"
/files/etc/dnf/dnf.conf/main/skip_if_unavailable = "True"
Note on EL8 and EL9 both paths /files/etc/yum.conf and /files/etc/dnf.conf are valid and equal.
Consequently on puppet runs yum::init sets the installonly_limit to 3 in the wrong non-existing file.
To solve this create a new file yum::settings that can have values set from hiera for the yum::config type. The more obvious use of setting this in init.pp is not possible since including this in yum::config would be a huge change for the module.
Note that when the install_limit is changed to 3 the following command is called
merging red on Fedora but it must be red on fedora in master branch also.
its less red that it was. Two more things to fix but they deserve their own MR.
Pull Request (PR) description
Currently the augeas path for main configuration is at
/files/etc/yum.conf/main
.Use a dnf or yum based path based on the package_provider fact.
On Fedora 36 and newer that hard coded augeas path does not exist:
only the new updated dnf based path exists.
Note on EL8 and EL9 both paths
/files/etc/yum.conf
and/files/etc/dnf.conf
are valid and equal.Consequently on puppet runs
yum::init
sets theinstallonly_limit
to 3 in the wrong non-existing file.To solve this create a new file yum::settings that can have values set from hiera for the
yum::config
type. The more obvious use of setting this ininit.pp
is not possible since including this inyum::config
would be a huge change for the module.Note that when the install_limit is changed to 3 the following command is called
/usr/bin/package-cleanup --oldkernels --count=3 -y
and this is bug #295 . This patch hides that problem in acceptance tests again.