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
This commit is contained in:
Colleen Murphy 2018-08-09 21:06:15 +02:00
parent 3baf809e4e
commit 65eab03783
1 changed files with 1 additions and 1 deletions

View File

@ -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'