From b537c3ce49247e339ff8e67ef6ecdd41ecf2d438 Mon Sep 17 00:00:00 2001 From: David Galloway Date: Wed, 17 Feb 2016 22:34:35 -0500 Subject: [PATCH] Fixes http://tracker.ceph.com/issues/14790 Cobbler would fail to create kickstart because non-Fedora distros would return 7.X, for example, as the integer resulting in CentOS and RHEL kickstarts to fail Fixes: #14790 Signed-off-by: David Galloway --- roles/cobbler/templates/snippets/cephlab_packages_rhel | 4 ++-- roles/cobbler/templates/snippets/cephlab_rc_local | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/cobbler/templates/snippets/cephlab_packages_rhel b/roles/cobbler/templates/snippets/cephlab_packages_rhel index f6ce35e..ac772bd 100644 --- a/roles/cobbler/templates/snippets/cephlab_packages_rhel +++ b/roles/cobbler/templates/snippets/cephlab_packages_rhel @@ -1,8 +1,8 @@ ## {{ ansible_managed }} ## @base group no longer exists in >=Fedora-22 #set distro = $getVar('distro','').split("-")[0] -#set distro_ver = $int($getVar('distro','').split("-")[1]) -#if $distro == 'Fedora' and $distro_ver >= 22 +#set distro_ver = $getVar('distro','').split("-")[1] +#if $distro == 'Fedora' and int($distro_ver) >= 22 @^infrastructure-server-environment #else @base diff --git a/roles/cobbler/templates/snippets/cephlab_rc_local b/roles/cobbler/templates/snippets/cephlab_rc_local index 263a5fd..17bee59 100644 --- a/roles/cobbler/templates/snippets/cephlab_rc_local +++ b/roles/cobbler/templates/snippets/cephlab_rc_local @@ -2,8 +2,8 @@ #set lockfile = '/.cephlab_rc_local' # Set proper location for firstboot ansible post-install trigger #set distro = $getVar('distro','').split("-")[0] -#set distro_ver = $int($getVar('distro','').split("-")[1]) -#if $distro == 'Fedora' and $distro_ver >= 22 +#set distro_ver = $getVar('distro','').split("-")[1] +#if $distro == 'Fedora' and int($distro_ver) >= 22 #set script = '/etc/rc.d/rc.local' #else #set script = '/etc/rc.local' -- 2.39.5