Skip to content

Commit 48fa672

Browse files
PierreRdavejrt
authored andcommitted
Use versioncmp instead of type casting (#330)
* Remove one unnecessary type annotation * Add versioncmp to compare version (instead of casting)
1 parent 0bf9198 commit 48fa672

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

manifests/init.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@
494494
}
495495
}
496496

497-
if ($::operatingsystem == 'CentOS') and (Integer($::operatingsystemmajrelease) < 7){
497+
if ($::operatingsystem == 'CentOS') and (versioncmp($::operatingsystemmajrelease, '7') < 0) {
498498
fail(translate('This module only works on CentOS version 7 and higher based systems.'))
499499
}
500500

0 commit comments

Comments
 (0)