Skip to content

Commit

Permalink
Fix deprecation messages in Puppet 2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
blt04 committed Oct 11, 2011
1 parent 16b2d56 commit 653e877
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 8 deletions.
19 changes: 15 additions & 4 deletions manifests/classes/passenger-centos-post.pp
@@ -1,9 +1,20 @@
class rvm::passenger::apache::centos::post {
class rvm::passenger::apache::centos::post(
$ruby_version,
$version,
$rvm_prefix = '/usr/local/',
$mininstances = '1',
$maxpoolsize = '6',
$poolidletime = '300',
$maxinstancesperapp = '0',
$spawnmethod = 'smart-lv2',
$gempath,
$binpath
) {

exec {
'passenger-install-apache2-module':
command => "${binpath}rvm ${ruby_version} exec passenger-install-apache2-module -a",
creates => "${gempath}/passenger-${version}/ext/apache2/mod_passenger.so",
command => "${rvm::passenger::apache::binpath}rvm ${rvm::passenger::apache::ruby_version} exec passenger-install-apache2-module -a",
creates => "${rvm::passenger::apache::gempath}/passenger-${rvm::passenger::apache::version}/ext/apache2/mod_passenger.so",
logoutput => 'on_failure',
require => [Rvm_gem['passenger'], Package['httpd','httpd-devel','mod_ssl']];
}
Expand All @@ -15,4 +26,4 @@
require => Exec['passenger-install-apache2-module'];
}

}
}
15 changes: 13 additions & 2 deletions manifests/classes/passenger-ubuntu-post.pp
@@ -1,4 +1,15 @@
class rvm::passenger::apache::ubuntu::post {
class rvm::passenger::apache::ubuntu::post(
$ruby_version,
$version,
$rvm_prefix = '/usr/local/',
$mininstances = '1',
$maxpoolsize = '6',
$poolidletime = '300',
$maxinstancesperapp = '0',
$spawnmethod = 'smart-lv2',
$gempath,
$binpath
) {

exec {
'passenger-install-apache2-module':
Expand Down Expand Up @@ -50,4 +61,4 @@
File['/etc/apache2/mods-enabled/passenger.load'] ~> Service['httpd']
File['/etc/apache2/mods-enabled/passenger.conf'] ~> Service['httpd']
}
}
}
26 changes: 24 additions & 2 deletions manifests/classes/passenger.pp
Expand Up @@ -27,7 +27,29 @@
$binpath = "${rvm_prefix}rvm/bin/"

case $operatingsystem {
Ubuntu: { include rvm::passenger::apache::ubuntu::post }
CentOS,RedHat: { include rvm::passenger::apache::centos::post }
Ubuntu: { class {'rvm::passenger::apache::ubuntu::post':
ruby_version => $ruby_version,
version => $version,
rvm_prefix => $rvm_prefix,
mininstances => $mininstances,
maxpoolsize => $maxpoolsize,
poolidletime => $poolidletime,
maxinstancesperapp => $maxinstancesperapp,
spawnmethod => $spawnmethod,
gempath => $gempath,
binpath => $binpath;
} }
CentOS,RedHat: { class {'rvm::passenger::apache::centos::post':
ruby_version => $ruby_version,
version => $version,
rvm_prefix => $rvm_prefix,
mininstances => $mininstances,
maxpoolsize => $maxpoolsize,
poolidletime => $poolidletime,
maxinstancesperapp => $maxinstancesperapp,
spawnmethod => $spawnmethod,
gempath => $gempath,
binpath => $binpath;
} }
}
}

0 comments on commit 653e877

Please sign in to comment.