From: David Galloway Date: Thu, 18 Feb 2016 03:34:35 +0000 (-0500) Subject: Fixes http://tracker.ceph.com/issues/14790 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F200%2Fhead;p=ceph-cm-ansible.git 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 --- diff --git a/roles/cobbler/templates/snippets/cephlab_packages_rhel b/roles/cobbler/templates/snippets/cephlab_packages_rhel index f6ce35e5..ac772bd9 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 263a5fda..17bee594 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'