From time to time we hit
https://bugzilla.redhat.com/show_bug.cgi?id=1741381
which result in 'dnf autoremove' failing. The suggested workaround
is to manually mark kernel packages as user-installed, so let's do
that every single time just in case.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
guests/playbooks/update/tasks/base.yml | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/guests/playbooks/update/tasks/base.yml
b/guests/playbooks/update/tasks/base.yml
index f085f19..97f365e 100644
--- a/guests/playbooks/update/tasks/base.yml
+++ b/guests/playbooks/update/tasks/base.yml
@@ -100,6 +100,13 @@
when:
- package_format == 'pkg'
+- name: Clean up packages after update
+ command: '{{ package_manager }} mark install "kernel*"'
+ args:
+ warn: no
+ when:
+ - os_name == 'Fedora'
+
- name: Clean up packages after update
shell: '{{ package_manager }} clean packages -y && {{ package_manager }}
autoremove -y'
args:
--
2.24.1