From 013781cb46d976192f0c9b8c80b59039fefdf2cd Mon Sep 17 00:00:00 2001 From: Colleen Murphy Date: Thu, 26 Apr 2018 21:39:50 +0200 Subject: [PATCH] Use versioncmp function Puppet 4 is more strict about data types and doesn't tolerate using arithmetic operators on strings. The operatingsystemrelease fact is a string. Switch the arithmetic comparison to a native function that knows how to deal with version numbers. Change-Id: I63b0ffaba89d609a8107235759653be415820d7c --- manifests/params.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/params.pp b/manifests/params.pp index d3c4bb1..c6847b4 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -46,7 +46,7 @@ class refstack::params ( ) { # Resolve a few parameters based on the install environment. - if $::operatingsystem != 'Ubuntu' or $::operatingsystemrelease < 13.10 { + if $::operatingsystem != 'Ubuntu' or versioncmp($::operatingsystemrelease, '13.10') < 0 { fail("${::operatingsystem} ${::operatingsystemrelease} is not supported.") }