puppet-foreman/manifests/config/passenger.pp @ 222fb5e5
2feb6150 | Ewoud Kohl van Wijngaarden | # Configure the foreman service using passenger
|
|
2a756241 | Corey Osman | class foreman::config::passenger(
|
|
# specifiy which interface to bind passenger to eth0, eth1, ...
|
|||
3f41a42c | Dominic Cleal | $listen_on_interface = '',
|
|
222fb5e5 | Adam Heinz | $scl_prefix = undef,
|
|
$ssl_ca = $foreman::server_ssl_ca,
|
|||
$ssl_cert = $foreman::server_ssl_cert,
|
|||
$ssl_key = $foreman::server_ssl_key
|
|||
2a756241 | Corey Osman | ) {
|
|
8c974670 | Ohad Levy | include apache::ssl
|
|
include ::passenger
|
|||
3f41a42c | Dominic Cleal | if $scl_prefix {
|
|
class { '::passenger::install::scl':
|
|||
prefix => $scl_prefix,
|
|||
}
|
|||
}
|
|||
8c974670 | Ohad Levy | ||
2a756241 | Corey Osman | # Check the value in case the interface doesn't exist, otherwise listen on all interfaces
|
|
2feb6150 | Ewoud Kohl van Wijngaarden | if $listen_on_interface in split($::interfaces, ',') {
|
|
c26aa36d | Ewoud Kohl van Wijngaarden | $listen_interface = inline_template("<%= @ipaddress_${listen_on_interface} %>")
|
|
2feb6150 | Ewoud Kohl van Wijngaarden | } else {
|
|
2a756241 | Corey Osman | $listen_interface = '*'
|
|
}
|
|||
0a0910c6 | Mickaël Canévet | $foreman_conf = $foreman::use_vhost ? {
|
|
false => 'foreman/foreman-apache.conf.erb',
|
|||
default => 'foreman/foreman-vhost.conf.erb',
|
|||
}
|
|||
827dbbe2 | Jan Vansteenkiste | file {'foreman_vhost':
|
|
4dc49816 | Ivan Necas | path => "${foreman::apache_conf_dir}/foreman.conf",
|
|
0a0910c6 | Mickaël Canévet | content => template($foreman_conf),
|
|
827dbbe2 | Jan Vansteenkiste | mode => '0644',
|
|
f8a88f23 | Ewoud Kohl van Wijngaarden | notify => Class['foreman::service'],
|
|
bfc57251 | sam Kottler | require => Class['foreman::install'],
|
|
8c974670 | Ohad Levy | }
|
|
081eb96a | Jan Vansteenkiste | file { ["${foreman::app_root}/config.ru", "${foreman::app_root}/config/environment.rb"]:
|
|
9940d5c0 | sam Kottler | owner => $foreman::user,
|
|
require => Class['foreman::install'],
|
|||
8c974670 | Ohad Levy | }
|
|
}
|