Revision 2a756241
Added by Corey Osman about 11 years ago
manifests/config.pp | ||
---|---|---|
ensure => absent,
|
||
}
|
||
|
||
if $foreman::passenger { include foreman::config::passenger }
|
||
if $foreman::passenger {
|
||
class{"foreman::config::passenger":
|
||
listen_on_interface => $foreman::passenger_interface,
|
||
}
|
||
}
|
||
|
||
}
|
manifests/config/passenger.pp | ||
---|---|---|
class foreman::config::passenger {
|
||
class foreman::config::passenger(
|
||
|
||
# specifiy which interface to bind passenger to eth0, eth1, ...
|
||
$listen_on_interface = ''
|
||
|
||
|
||
) {
|
||
include apache::ssl
|
||
include ::passenger
|
||
|
||
# Check the value in case the interface doesn't exist, otherwise listen on all interfaces
|
||
if inline_template("<%= interfaces.split(',').include?(listen_on_interface) %>") == "true" {
|
||
$listen_interface = inline_template("<%= ipaddress_${listen_on_interface} %>")
|
||
}
|
||
else{
|
||
$listen_interface = '*'
|
||
}
|
||
|
||
$foreman_conf = $foreman::use_vhost ? {
|
||
false => 'foreman/foreman-apache.conf.erb',
|
||
default => 'foreman/foreman-vhost.conf.erb',
|
manifests/init.pp | ||
---|---|---|
$apache_conf_dir = $foreman::params::apache_conf_dir,
|
||
$puppet_home = $foreman::params::puppet_home,
|
||
$locations_enabled = $foreman::params::locations_enabled,
|
||
$organizations_enabled = $foreman::params::organizations_enabled
|
||
$organizations_enabled = $foreman::params::organizations_enabled,
|
||
$passenger_interface = $foreman::params::passenger_interface
|
||
) inherits foreman::params {
|
||
class { 'foreman::install': } ~>
|
||
class { 'foreman::config': } ~>
|
manifests/params.pp | ||
---|---|---|
$use_vhost = true
|
||
# force SSL (note: requires passenger)
|
||
$ssl = true
|
||
|
||
#define which interface passenger should listen on, undef means all interfaces
|
||
$passenger_interface = ''
|
||
# Choose whether you want to enable locations and organizations.
|
||
$locations_enabled = false
|
||
$organizations_enabled = false
|
templates/foreman-vhost.conf.erb | ||
---|---|---|
<%= ERB.new(File.read(File.expand_path("_header.erb",File.dirname(file)))).result(binding) -%>
|
||
|
||
<VirtualHost <%= ipaddress %>:80>
|
||
<VirtualHost <%= listen_interface %>:80>
|
||
ServerName <%= fqdn %>
|
||
ServerAlias foreman
|
||
DocumentRoot <%= scope.lookupvar 'foreman::app_root' %>/public
|
||
... | ... | |
|
||
</VirtualHost>
|
||
|
||
<VirtualHost <%= ipaddress %>:443>
|
||
<VirtualHost <%= listen_interface %>:443>
|
||
ServerName <%= fqdn %>
|
||
ServerAlias foreman
|
||
|
Also available in: Unified diff
added ability to specify which interface to listen on