From: David Galloway Date: Wed, 27 Apr 2016 21:00:00 +0000 (-0400) Subject: cobbler: Only set bootdev in kickstart if installing Xenial. X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F234%2Fhead;p=ceph-cm-ansible.git cobbler: Only set bootdev in kickstart if installing Xenial. "bootdev string default" is only supported in Xenial. Signed-off-by: David Galloway --- diff --git a/roles/cobbler/templates/kickstarts/cephlab_ubuntu.preseed b/roles/cobbler/templates/kickstarts/cephlab_ubuntu.preseed index 5cd0ff0d..abcf51a5 100644 --- a/roles/cobbler/templates/kickstarts/cephlab_ubuntu.preseed +++ b/roles/cobbler/templates/kickstarts/cephlab_ubuntu.preseed @@ -3,6 +3,12 @@ # Fetch the os_version from the distro using this profile. #set os_version = $getVar('os_version','') +# Fetch Ubuntu version (e.g., 14.04) +#set distro_ver = $getVar('distro','').split("-")[1] + +# Fetch Ubuntu major version (e.g., 14) +#set distro_ver_major = $distro_ver.split(".")[0] + ### Apt setup # You can choose to install non-free and contrib software. #d-i apt-setup/non-free boolean true @@ -109,8 +115,8 @@ d-i pkgsel/upgrade select safe-upgrade # "landscape" (manage system with Landscape). d-i pkgsel/update-policy select none -# Install GRUB to default location. Required as of Xenial. -#if $os_version == 'xenial' +# Set GRUB bootdev to 'default' if Xenial or later +#if int($distro_ver_major) >= 16 d-i grub-installer/bootdev string default #end if