]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
cobbler: Hacks for CentOS 9 on braggi disks 703/head
authorDavid Galloway <dgallowa@redhat.com>
Thu, 25 Aug 2022 18:55:14 +0000 (14:55 -0400)
committerDavid Galloway <dgallowa@redhat.com>
Thu, 25 Aug 2022 19:22:14 +0000 (15:22 -0400)
During anaconda/kickstart, the smaller root drive shows up as sdb but then helpfully becomes sda after the OS is installed.

Signed-off-by: David Galloway <dgallowa@redhat.com>
roles/cobbler/templates/snippets/cephlab_rhel_disks

index 20c8a1a912c82d9c238948f3a31398edf5c8f9fa..0c9425a400c0a19e4ae22d81b5e9528c9afb9043 100644 (file)
@@ -1,5 +1,12 @@
 ## {{ ansible_managed }}
 #set os_version = $getVar('os_version','')
+# #set hostname = $getVar('name','')
+#set distro = $getVar('distro','').split("-")[0]
+#set distro_ver = $getVar('distro','').split("-")[1]
+#if $distro == 'RHEL' or $distro == 'CentOS'
+#set distro_ver_major = $distro_ver.split(".")[0]
+#set distro_ver_minor = $distro_ver.split(".")[1]
+#end if
 # Partition clearing information
 clearpart --all --initlabel
 # Use all of /dev/sda for the root partition (20G minimum)
@@ -9,9 +16,13 @@ zerombr
 # System bootloader configuration
 #if $os_version == 'rhel7'
     #set bootloader_args = "--location=mbr --boot-drive=sda"
-#else if $os_version == 'rhel8'
+#else if int($distro_ver_major) >= 8 and 'braggi' not in $hostname
     #set bootloader_args = "--location=mbr --boot-drive=sda"
 ignoredisk --only-use=sda
+# On CentOS9 on braggi, the smaller "root" drive is sdb during kickstart and sda after booting into the OS.
+#else if int($distro_ver_major) == 9 and 'braggi' in $hostname
+    #set bootloader_args = "--location=mbr --driveorder=sdb,sda"
+ignoredisk --only-use=sda
 #else
     #set bootloader_args = "--location=mbr --driveorder=sda"
 #end if