diff options
author | Micah Anderson <micah@riseup.net> | 2016-11-04 10:54:28 -0400 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2016-11-04 10:54:28 -0400 |
commit | 34a381efa8f6295080c843f86bfa07d4e41056af (patch) | |
tree | 9282cf5d4c876688602705a7fa0002bc4a810bde /puppet/modules/passenger/manifests/init.pp | |
parent | 0a72bc6fd292bf9367b314fcb0347c4d35042f16 (diff) | |
parent | 5821964ff7e16ca7aa9141bd09a77d355db492a9 (diff) |
Merge branch 'develop'
Diffstat (limited to 'puppet/modules/passenger/manifests/init.pp')
m--------- | puppet/modules/passenger | 0 | ||||
-rw-r--r-- | puppet/modules/passenger/manifests/init.pp | 75 |
2 files changed, 75 insertions, 0 deletions
diff --git a/puppet/modules/passenger b/puppet/modules/passenger deleted file mode 160000 -Subproject d1b46de84acf4d9e3582b64e019935fb1125f9b diff --git a/puppet/modules/passenger/manifests/init.pp b/puppet/modules/passenger/manifests/init.pp new file mode 100644 index 00000000..ed9b8c31 --- /dev/null +++ b/puppet/modules/passenger/manifests/init.pp @@ -0,0 +1,75 @@ +# passenger module +# +# Copyright 2010, Riseup Networks +# Micah Anderson micah(at)riseup.net +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 3 as +# published by the Free Software Foundation. + +class passenger ( + $use_gems = false, $manage_munin = false, + $passenger_ensure_version = 'installed', + $librack_ensure_version = 'installed', + $passenger_bin_path = '/usr/sbin' ) +{ + Class['::apache'] -> Class['passenger'] + + if ! $use_gems { + + apache::module { 'passenger': + ensure => $passenger_ensure_version, + package_name => 'libapache2-mod-passenger'; + } + + if !defined(Package['librack-ruby']) { + if $::lsbdistcodename == 'squeeze' { + package { 'librack-ruby1.8': ensure => $librack_ensure_version } + } + else { + package { 'ruby-rack': + ensure => $librack_ensure_version; + } + } + } + } + else { + package { + 'passenger': + ensure => $passenger_ensure_version, + provider => gem; + 'rack': + ensure => $librack_ensure_version, + provider => gem; + } + } + + apache::config::file { 'mod_passenger': + ensure => present, + source => [ "puppet:///modules/site_passenger/${::fqdn}/mod_passenger.conf", + 'puppet:///modules/site_passenger/mod_passenger.conf', + 'puppet:///modules/passenger/mod_passenger.conf', + ], + } + + if $manage_munin { + if $passenger_memory_munin_config == '' { + $passenger_memory_munin_config = "user root\nenv.passenger_memory_stats ${passenger_bin_path}/passenger-memory-stats" + } + + if $passenger_stats_munin_config == '' { + $passenger_stats_munin_config = "user root\nenv.passenger_status ${passenger_bin_path}/passenger-status" + } + + munin::plugin::deploy { + 'passenger_memory_stats': + source => 'passenger/munin/passenger_memory_stats', + config => $passenger_memory_munin_config; + 'passenger_stats': + source => 'passenger/munin/passenger_stats', + config => $passenger_stats_munin_config; + } + } + +} + |