From 2d5d6b4ff3e8a1bb17e5144e4bf46e8a984ca8b6 Mon Sep 17 00:00:00 2001 From: David Galloway Date: Thu, 2 Dec 2021 17:03:02 -0500 Subject: [PATCH] cobbler: Run yum update during CentOS Stream install It occurred to me that the CentOS 8 Stream ISO is probably always going to be outdated so we can just run 'yum update' during kickstart. We *don't* want to do this for non-Stream distro because it'll update a RHEL8.4 image to RHEL8.5, for example. Signed-off-by: David Galloway --- roles/cobbler/templates/kickstarts/cephlab_rhel.ks | 5 +++++ roles/cobbler/templates/kickstarts/cephlab_rhel_sdi.ks | 5 +++++ roles/cobbler/templates/kickstarts/cephlab_rhel_sdm.ks | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/roles/cobbler/templates/kickstarts/cephlab_rhel.ks b/roles/cobbler/templates/kickstarts/cephlab_rhel.ks index f59763f..b1b93cf 100644 --- a/roles/cobbler/templates/kickstarts/cephlab_rhel.ks +++ b/roles/cobbler/templates/kickstarts/cephlab_rhel.ks @@ -86,8 +86,13 @@ $SNIPPET('cephlab_user') #if $distro == 'RHEL' $SNIPPET('cephlab_rhel_rhsm') #end if +#if distro_ver_minor == 'stream' +# We want the latest packages because it's Stream +yum -y update +#else # Update to latest kernel before rebooting yum -y update kernel +#end if $SNIPPET('cephlab_rc_local') $SNIPPET('kickstart_done') # End final steps diff --git a/roles/cobbler/templates/kickstarts/cephlab_rhel_sdi.ks b/roles/cobbler/templates/kickstarts/cephlab_rhel_sdi.ks index f2ee0c6..06be6a3 100644 --- a/roles/cobbler/templates/kickstarts/cephlab_rhel_sdi.ks +++ b/roles/cobbler/templates/kickstarts/cephlab_rhel_sdi.ks @@ -100,8 +100,13 @@ $SNIPPET('cephlab_user') #if $distro == 'RHEL' $SNIPPET('cephlab_rhel_rhsm') #end if +#if distro_ver_minor == 'stream' +# We want the latest packages because it's Stream +yum -y update +#else # Update to latest kernel before rebooting yum -y update kernel +#end if $SNIPPET('cephlab_rc_local') $SNIPPET('kickstart_done') # End final steps diff --git a/roles/cobbler/templates/kickstarts/cephlab_rhel_sdm.ks b/roles/cobbler/templates/kickstarts/cephlab_rhel_sdm.ks index a47bef4..744bd9f 100644 --- a/roles/cobbler/templates/kickstarts/cephlab_rhel_sdm.ks +++ b/roles/cobbler/templates/kickstarts/cephlab_rhel_sdm.ks @@ -100,8 +100,13 @@ $SNIPPET('cephlab_user') #if $distro == 'RHEL' $SNIPPET('cephlab_rhel_rhsm') #end if +#if distro_ver_minor == 'stream' +# We want the latest packages because it's Stream +yum -y update +#else # Update to latest kernel before rebooting yum -y update kernel +#end if $SNIPPET('cephlab_rc_local') $SNIPPET('kickstart_done') # End final steps -- 2.39.5