0b60cdd6a1
'apache' module is needed by 'horizon' 4.1.0 173967ab8dd21a93d6f2b47ff2641d0092f729b1 v 1.2.0 Fuel-CI: disable Partial blueprint: merge-openstack-puppet-modules Change-Id: I0f5ff2fafe058c0263c2ace4bc0ce8f7828d3be0
36 lines
988 B
Puppet
36 lines
988 B
Puppet
# Class: apache::version
|
|
#
|
|
# Try to automatically detect the version by OS
|
|
#
|
|
class apache::version {
|
|
# This will be 5 or 6 on RedHat, 6 or wheezy on Debian, 12 or quantal on Ubuntu, 3 on Amazon, etc.
|
|
$osr_array = split($::operatingsystemrelease,'[\/\.]')
|
|
$distrelease = $osr_array[0]
|
|
if ! $distrelease {
|
|
fail("Class['apache::version']: Unparsable \$::operatingsystemrelease: ${::operatingsystemrelease}")
|
|
}
|
|
|
|
case $::osfamily {
|
|
'RedHat': {
|
|
if ($::operatingsystem == 'Fedora' and $distrelease >= 18) or ($::operatingsystem != 'Fedora' and $distrelease >= 7) {
|
|
$default = '2.4'
|
|
} else {
|
|
$default = '2.2'
|
|
}
|
|
}
|
|
'Debian': {
|
|
if $::operatingsystem == 'Ubuntu' and $::operatingsystemrelease >= 13.10 {
|
|
$default = '2.4'
|
|
} else {
|
|
$default = '2.2'
|
|
}
|
|
}
|
|
'FreeBSD': {
|
|
$default = '2.2'
|
|
}
|
|
default: {
|
|
fail("Class['apache::version']: Unsupported osfamily: ${::osfamily}")
|
|
}
|
|
}
|
|
}
|