From 65eab037839bdfba9bc8b0e91deef92c306813ff Mon Sep 17 00:00:00 2001 From: Colleen Murphy Date: Thu, 9 Aug 2018 21:06:15 +0200 Subject: [PATCH] Use versioncmp function Without this patch, puppet uses lexicographic ordering to compare the version string in the operatingsystemrelease fact to the string '14.04', which works fine on puppet 4 since it is comparing two strings but it is more correct to use the versioncmp function. Change-Id: I56d989d22229db3d606e4ac7f788925c216721a0 --- manifests/init.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index 6a284e9..933a765 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -27,7 +27,7 @@ class ethercalc ( # file case $::operatingsystem { 'Ubuntu': { - if $::operatingsystemrelease <= '14.04' { + if versioncmp($::operatingsystemrelease, '14.04') <= 0 { $use_upstart = true if ! $nodejs_version { $use_nodejs_version = '4.x'