Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Add support for new timer name in dnf5 #9

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rynofinn
Copy link

Thank you for this role. I've been using it on CentOS7, 8, 9 and Fedora 40, 41.

This role began throwing errors when trying to manage a Fedora41 system which introduced dnf5. This changed the package name for dnf-automatic and the timer name.
This commit introduces logic to test for distribution and then apply appropriate dnf config.

Copy link
Owner

@exploide exploide left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your PR! I'm not using this role on my own since some time but I accept PRs, so thanks for tackling this.

Besides of the import logic, I think this PR is good.

While this now supports dnf5, I'm wondering whether you would also be interested to implement #8 (it's fine if you won't). The dnf5 introduction in this role might be a good opportunity because we already distinguish old and new dnf now. The built-in reboot functionality could only be used for dnf5 then. Though, I realize that reboot functionality seems to be present in certain versions of older dnf as well. Don't know if all distributions lacking that support are already EOL, so maybe we could drop the legacy mechanism altogether but I'm not sure and it would be fine to have this for dnf5 only, when it's easier.

@@ -1,63 +1,19 @@
---
# manage dnf bases on the distribution
Copy link
Owner

@exploide exploide Jan 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the conditional import logic can be greatly simplified. As far as I know, ansible_pkg_mgr is either set to dnf for older dnf or to dnf5. This should be enough (when: ansible_pkg_mgr == "dnf5"). Or do you see any problem with this approach?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants