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

Add support for the dnf5 package manager #38

Merged
merged 7 commits into from
Nov 13, 2024
Merged

Conversation

jsf9k
Copy link
Member

@jsf9k jsf9k commented Nov 12, 2024

🗣 Description

This pull requests adds support for the dnf5 package manager.

💭 Motivation and context

We are adding support for Fedora 41 soon in cisagov/skeleton-ansible-role#207, and ansible identifies the package manager for that platform as dnf5, so we need to support it.

🧪 Testing

All automated tests pass. These changes are also tested as part of cisagov/skeleton-ansible-role#207.

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • Tests have been added and/or modified to cover the changes in this PR.
  • All new and existing tests pass.

The OS is a secondary factor when determining which vars or tasks
files to use.
Note that the tasks file is just a symlink to the dnf tasks file.
@jsf9k jsf9k added the improvement This issue or pull request will add or improve functionality, maintainability, or ease of use label Nov 12, 2024
@jsf9k jsf9k self-assigned this Nov 12, 2024
jsf9k added a commit to cisagov/freeipa-server-packer that referenced this pull request Nov 12, 2024
…d-security-updates

This is being done for testing purposes and this change can be
reverted once cisagov/ansible-role-automated-security-updates#38 is
merged.
@jsf9k jsf9k force-pushed the improvement/support-dnf5 branch 2 times, most recently from 8116621 to ca17d56 Compare November 12, 2024 20:28
With these updates the /etc/dnf/automatic.conf file will be created if
it does not exist, as seems to be the case.  These changes also take
advantage of the INI structure of /etc/dnf/automatic.conf to use
community.general.ini_file vice ansible.builtin.lineinfile.  This
makes the code cleaner, less fragile, and easier to understand.
@jsf9k jsf9k force-pushed the improvement/support-dnf5 branch from ca17d56 to ee888ce Compare November 12, 2024 21:13
We don't support this platform yet, but we will soon.  See
cisagov/skeleton-ansible-role#207 for more details.
@jsf9k jsf9k marked this pull request as ready for review November 12, 2024 21:52
@jsf9k jsf9k requested a review from a team November 12, 2024 21:53
Copy link
Member

@mcdonnnj mcdonnnj left a comment

Choose a reason for hiding this comment

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

Just a couple items for your consideration.

jsf9k and others added 2 commits November 13, 2024 09:38
Co-authored-by: Nick M <50747025+mcdonnnj@users.noreply.github.com>
We don't use these right now, but we may in the future.

Co-authored-by: Nick M <50747025+mcdonnnj@users.noreply.github.com>
@jsf9k jsf9k force-pushed the improvement/support-dnf5 branch from d839ff9 to c0476df Compare November 13, 2024 14:38
Copy link
Member

@dav3r dav3r left a comment

Choose a reason for hiding this comment

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

👍

@jsf9k jsf9k merged commit 07ac358 into develop Nov 13, 2024
53 checks passed
@jsf9k jsf9k deleted the improvement/support-dnf5 branch November 13, 2024 17:32
jsf9k added a commit to cisagov/freeipa-server-packer that referenced this pull request Nov 13, 2024
jsf9k added a commit that referenced this pull request Nov 27, 2024
I had previously attempted to preemptively prepare the Molecule test
code for the addition of Fedora 41 in #38, but I failed to realize
that the Fedora version is stored in host.system_info.release not
host.system_info.codename.  In fact, host.system_info.codename is
actually an empty string for Fedora.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement This issue or pull request will add or improve functionality, maintainability, or ease of use
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants