Skip to content

Commit

Permalink
Merge pull request #1103 from BurritoAlPastor/amazon_linux_version
Browse files Browse the repository at this point in the history
MODULES-1937: fixes mismatching of Apache version on Amazon Linux
  • Loading branch information
tphoney committed May 14, 2015
2 parents 455f7c8 + 0e20f6d commit aff0c2b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions manifests/version.pp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# 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.
# This will be 5 or 6 on RedHat, 6 or wheezy on Debian, 12 or quantal on Ubuntu, etc.
$osr_array = split($::operatingsystemrelease,'[\/\.]')
$distrelease = $osr_array[0]
if ! $distrelease {
Expand All @@ -12,7 +12,9 @@

case $::osfamily {
'RedHat': {
if ($::operatingsystem == 'Fedora' and versioncmp($distrelease, '18') >= 0) or ($::operatingsystem != 'Fedora' and versioncmp($distrelease, '7') >= 0) {
if ($::operatingsystem == 'Amazon') {
$default = '2.2'
} elsif ($::operatingsystem == 'Fedora' and versioncmp($distrelease, '18') >= 0) or ($::operatingsystem != 'Fedora' and versioncmp($distrelease, '7') >= 0) {
$default = '2.4'
} else {
$default = '2.2'
Expand Down

0 comments on commit aff0c2b

Please sign in to comment.