Skip to content

Commit

Permalink
Support the dnf5 package manager
Browse files Browse the repository at this point in the history
We are adding support for Fedora 41 soon in
cisagov/skeleton-ansible-role#207, and that release only supports
dnf5, so we need to support it.
  • Loading branch information
jsf9k committed Nov 8, 2024
1 parent e9dcb41 commit d3cab99
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions tasks/dnf5.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
- name: Upgrade all packages
block:
# TODO: Remove the following block when that becomes possible.
# See #64 for more details.
- name: Upgrade the kernel-core package separately on Fedora
when: ansible_distribution == "Fedora"
block:
- name: Update package cache (Fedora)
ansible.builtin.dnf5:
update_cache: true
- name: Upgrade the kernel-core package separately (Fedora)
ansible.builtin.dnf5:
name: "{{ item }}"
# ansible-lint generates a warning that "package installs
# should not use latest" here, but this is one place where
# we want to use it.
state: latest # noqa package-latest
loop:
- kernel-core
- name: Upgrade all packages
ansible.builtin.dnf5:
name: "*"
# ansible-lint generates a warning that "package installs
# should not use latest" here, but this is one place where we
# want to use it.
state: latest # noqa package-latest
update_cache: true

0 comments on commit d3cab99

Please sign in to comment.