From a7f141066932f8869a81b3902ed54c7e5f79a9a8 Mon Sep 17 00:00:00 2001 From: Jeremy Frasier Date: Fri, 9 Aug 2024 15:28:11 -0400 Subject: [PATCH] Install the kernel-core package separately on Fedora Fedora currently has a problem where this package's post-install hooks error out when it is installed with too many other packages. Installing it by itself, then updating all the other packages, is a workaround. --- tasks/dnf.yml | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/tasks/dnf.yml b/tasks/dnf.yml index a1e85a5..4a12784 100644 --- a/tasks/dnf.yml +++ b/tasks/dnf.yml @@ -1,9 +1,28 @@ --- - name: Upgrade all packages - ansible.builtin.dnf: - 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 + 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.dnf: + update_cache: true + - name: Upgrade the kernel-core package separately (Fedora) + ansible.builtin.dnf: + 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.dnf: + 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