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: I4dd58b28ad5b4bd64ba0b6eed6e2b8c312bdb5fa
This commit is contained in:
Colleen Murphy 2018-04-20 21:57:32 +02:00
parent e4901f6217
commit 3b835cf7ee
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@
class drupal::params() {
case $::osfamily {
'Debian': {
if $::operatingsystem == 'Ubuntu' and $::operatingsystemrelease >= 13.10 {
if $::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '13.10') >= 0 {
$apache_version = '2.4'
} else {
$apache_version = '2.2'