Use dnf or yum augeas path for main configuration #307
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.