Skip to content

Commit 445b926

Browse files
committed
Fixes Facts string comparisons in CentOS 7
- CentOS Project has adopted a new rule for versioning numbers. The major number matches the RHEL major number, but the minor number is generated from the release date. For example, CentOS 7.1407. - Adds support for Scientific Linux. Change-Id: I183dd8e0a019d5fb486e8f0641f6ab81ae758f8f Closes-Bug: 1338777 Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com> (cherry picked from commit c18884b)
1 parent fb3b49f commit 445b926

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

manifests/params.pp

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,17 @@
4040
$ceph_init_override = '/etc/sysconfig/openstack-cinder-volume'
4141
$lio_package_name = 'targetcli'
4242

43-
if $::operatingsystem == 'RedHat' and $::operatingsystemrelease >= 7 {
44-
$iscsi_helper = 'lioadm'
45-
} else {
46-
$iscsi_helper = 'tgtadm'
43+
case $::operatingsystem {
44+
'RedHat', 'CentOS', 'Scientific': {
45+
if $::operatingsystemmajrelease >= 7 {
46+
$iscsi_helper = 'lioadm'
47+
} else {
48+
$iscsi_helper = 'tgtadm'
49+
}
50+
}
51+
default: {
52+
$Iscsi_helper = 'tgtadm'
53+
}
4754
}
4855

4956
} else {

0 commit comments

Comments
 (0)