summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColleen Murphy <colleen.murphy@suse.de>2018-08-09 21:06:15 +0200
committerColleen Murphy <colleen.murphy@suse.de>2018-08-13 17:35:42 +0200
commit65eab037839bdfba9bc8b0e91deef92c306813ff (patch)
tree0875ef6c4024c3a508126770928f611af72140d8
parent3baf809e4e061ebe6c3f2dad4422e74e7b656ffe (diff)
Use versioncmp functionHEADmaster
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
Notes
Notes (review): Code-Review+2: Clark Boylan <cboylan@sapwetik.org> Code-Review+2: Ian Wienand <iwienand@redhat.com> Workflow+1: Ian Wienand <iwienand@redhat.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Mon, 13 Aug 2018 22:57:00 +0000 Reviewed-on: https://review.openstack.org/590489 Project: openstack-infra/puppet-ethercalc Branch: refs/heads/master
-rw-r--r--manifests/init.pp2
1 files changed, 1 insertions, 1 deletions
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 (
27 # file 27 # file
28 case $::operatingsystem { 28 case $::operatingsystem {
29 'Ubuntu': { 29 'Ubuntu': {
30 if $::operatingsystemrelease <= '14.04' { 30 if versioncmp($::operatingsystemrelease, '14.04') <= 0 {
31 $use_upstart = true 31 $use_upstart = true
32 if ! $nodejs_version { 32 if ! $nodejs_version {
33 $use_nodejs_version = '4.x' 33 $use_nodejs_version = '4.x'