Skip to content

Commit

Permalink
Merge pull request #651 from jrnt30/hierarhcyFix
Browse files Browse the repository at this point in the history
Modifying hierarchy of the Version/Params to fix AWS AMI
  • Loading branch information
igalic committed Feb 27, 2014
2 parents d28ce64 + 769ff36 commit b499aa2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
7 changes: 0 additions & 7 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@
# Sample Usage:
#
class apache::params inherits ::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::params']: Unparsable \$::operatingsystemrelease: ${::operatingsystemrelease}")
}

if($::fqdn) {
$servername = $::fqdn
} else {
Expand Down
11 changes: 9 additions & 2 deletions manifests/version.pp
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,23 @@
# 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::params']: Unparsable \$::operatingsystemrelease: ${::operatingsystemrelease}")
}

case $::osfamily {
'RedHat': {
if ($::operatingsystem == 'Fedora' and $::operatingsystemrelease >= 18) or ($::operatingsystem != 'Fedora' and $::operatingsystemrelease >= 7) {
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 {
if $::operatingsystem == 'Ubuntu' and $distrelease >= 13.10 {
$default = 2.4
} else {
$default = 2.2
Expand Down

0 comments on commit b499aa2

Please sign in to comment.