Permalink
Browse files

Fix deprecation messages in Puppet 2.7

  • Loading branch information...
blt04 committed Oct 11, 2011
1 parent 16b2d56 commit 653e877979540d5288dbb1380628a5ffc8aec454
@@ -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']];
}
@@ -15,4 +26,4 @@
require => Exec['passenger-install-apache2-module'];
}
-}
+}
@@ -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':
@@ -50,4 +61,4 @@
File['/etc/apache2/mods-enabled/passenger.load'] ~> Service['httpd']
File['/etc/apache2/mods-enabled/passenger.conf'] ~> Service['httpd']
}
-}
+}
@@ -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.