puppet-foreman/manifests/params.pp @ 00e1cb9a
2feb6150 | Ewoud Kohl van Wijngaarden | # The foreman default parameters
|
|
8c974670 | Ohad Levy | class foreman::params {
|
|
# Basic configurations
|
|||
7697116c | Dominic Cleal | $foreman_url = "https://${::fqdn}"
|
|
fbf57a7a | Ewoud Kohl van Wijngaarden | # Should foreman act as an external node classifier (manage puppet class
|
|
# assignments)
|
|||
8c974670 | Ohad Levy | $enc = true
|
|
# Should foreman receive reports from puppet
|
|||
$reports = true
|
|||
# Should foreman recive facts from puppet
|
|||
$facts = true
|
|||
# should foreman manage host provisioning as well
|
|||
$unattended = true
|
|||
# Enable users authentication (default user:admin pw:changeme)
|
|||
c29484db | Dominic Cleal | $authentication = true
|
|
8c974670 | Ohad Levy | # configure foreman via apache and passenger
|
|
$passenger = true
|
|||
0a0910c6 | Mickaël Canévet | # Enclose apache configuration in <VirtualHost>...</VirtualHost>
|
|
$use_vhost = true
|
|||
8c974670 | Ohad Levy | # force SSL (note: requires passenger)
|
|
$ssl = true
|
|||
2a756241 | Corey Osman | #define which interface passenger should listen on, undef means all interfaces
|
|
$passenger_interface = ''
|
|||
6eb2584a | Sam Kottler | # Choose whether you want to enable locations and organizations.
|
|
$locations_enabled = false
|
|||
$organizations_enabled = false
|
|||
00e1cb9a | Jason Montleon | $configure_epel_repo = true
|
|
$configure_scl_repo = true
|
|||
6eb2584a | Sam Kottler | ||
8c974670 | Ohad Levy | # Advance configurations - no need to change anything here by default
|
|
ba4e919b | Ivan Necas | # if set to true, no repo will be added by this module, letting you to
|
|
# set it to some custom location.
|
|||
$custom_repo = false
|
|||
c7b3916d | Greg Sutcliffe | # this can be stable, rc, or nightly
|
|
479f7756 | Dominic Cleal | $repo = 'stable'
|
|
827dbbe2 | Jan Vansteenkiste | $railspath = '/usr/share'
|
|
8c974670 | Ohad Levy | $app_root = "${railspath}/foreman"
|
|
827dbbe2 | Jan Vansteenkiste | $user = 'foreman'
|
|
88e4c164 | Dominic Cleal | $group = 'foreman'
|
|
df3b6ffb | Greg Sutcliffe | $user_groups = ['puppet']
|
|
827dbbe2 | Jan Vansteenkiste | $environment = 'production'
|
|
fc9960ad | Dmitri Dolguikh | $gpgcheck = true
|
|
7fca4da8 | Rick Sherman | $version = 'present'
|
|
88e4c164 | Dominic Cleal | ||
bb44fefb | Dominic Cleal | # when undef, foreman-selinux will be installed if SELinux is enabled
|
|
# setting to false/true will override this check (e.g. set to false on 1.1)
|
|||
$selinux = undef
|
|||
88e4c164 | Dominic Cleal | # if enabled, will install and configure the database server on this host
|
|
$db_manage = true
|
|||
# Database 'production' settings
|
|||
$db_type = 'postgresql'
|
|||
$db_username = 'foreman'
|
|||
# Generate and cache the password on the master once
|
|||
# In multi-puppetmaster setups, the user should specify their own
|
|||
2feb6150 | Ewoud Kohl van Wijngaarden | $db_password = cache_data('db_password', random_password(32))
|
|
8c974670 | Ohad Levy | ||
# OS specific paths
|
|||
399eb54c | Byron Miller | case $::osfamily {
|
|
RedHat: {
|
|||
aff89ef6 | Ewoud Kohl van Wijngaarden | $apache_conf_dir = '/etc/httpd/conf.d'
|
|
399eb54c | Byron Miller | case $::operatingsystem {
|
|
fedora: {
|
|||
aff89ef6 | Ewoud Kohl van Wijngaarden | $puppet_basedir = '/usr/share/ruby/vendor_ruby/puppet'
|
|
399eb54c | Byron Miller | $yumcode = "f${::operatingsystemrelease}"
|
|
3f41a42c | Dominic Cleal | $passenger_scl = undef
|
|
27af4444 | Ewoud Kohl van Wijngaarden | $plugin_prefix = 'rubygem-foreman_'
|
|
399eb54c | Byron Miller | }
|
|
default: {
|
|||
aff89ef6 | Ewoud Kohl van Wijngaarden | $puppet_basedir = regsubst($::rubyversion, '^(\d+\.\d+).*$', '/usr/lib/ruby/site_ruby/\1/puppet')
|
|
$yumcode = regsubst($::operatingsystemrelease, '^(\d+)\..*$', 'el\1')
|
|||
3f41a42c | Dominic Cleal | # add passenger::install::scl as EL uses SCL on Foreman 1.2+
|
|
$passenger_scl = 'ruby193'
|
|||
27af4444 | Ewoud Kohl van Wijngaarden | $plugin_prefix = 'ruby193-rubygem-foreman_'
|
|
399eb54c | Byron Miller | }
|
|
312bb1f3 | Sam Kottler | }
|
|
6f40810e | Dominic Cleal | }
|
|
399eb54c | Byron Miller | Debian: {
|
|
5d3df572 | Greg Sutcliffe | $puppet_basedir = '/usr/lib/ruby/vendor_ruby/puppet'
|
|
827dbbe2 | Jan Vansteenkiste | $apache_conf_dir = '/etc/apache2/conf.d'
|
|
3f41a42c | Dominic Cleal | $passenger_scl = undef
|
|
27af4444 | Ewoud Kohl van Wijngaarden | $plugin_prefix = 'ruby-foreman-'
|
|
4c642122 | Greg Sutcliffe | }
|
|
8468de8b | Ewoud Kohl van Wijngaarden | Linux: {
|
|
case $::operatingsystem {
|
|||
Amazon: {
|
|||
$apache_conf_dir = '/etc/httpd/conf.d'
|
|||
$puppet_basedir = regsubst($::rubyversion, '^(\d+\.\d+).*$', '/usr/lib/ruby/site_ruby/\1/puppet')
|
|||
$yumcode = 'el6'
|
|||
# add passenger::install::scl as EL uses SCL on Foreman 1.2+
|
|||
$passenger_scl = 'ruby193'
|
|||
27af4444 | Ewoud Kohl van Wijngaarden | $plugin_prefix = 'ruby193-rubygem-foreman_'
|
|
8468de8b | Ewoud Kohl van Wijngaarden | }
|
|
default: {
|
|||
fail("${::hostname}: This module does not support operatingsystem ${::operatingsystem}")
|
|||
}
|
|||
}
|
|||
}
|
|||
aff89ef6 | Ewoud Kohl van Wijngaarden | default: {
|
|
fail("${::hostname}: This module does not support osfamily ${::osfamily}")
|
|||
8c974670 | Ohad Levy | }
|
|
}
|
|||
827dbbe2 | Jan Vansteenkiste | $puppet_home = '/var/lib/puppet'
|
|
c987cde9 | Greg Petras | $puppet_user = 'puppet'
|
|
7697116c | Dominic Cleal | ||
# If CA is specified, remote Foreman host will be verified in reports/ENC scripts
|
|||
$client_ssl_ca = "${puppet_home}/ssl/certs/ca.pem"
|
|||
# Used to authenticate to Foreman, required if require_ssl_puppetmasters is enabled
|
|||
2feb6150 | Ewoud Kohl van Wijngaarden | $client_ssl_cert = "${puppet_home}/ssl/certs/${::fqdn}.pem"
|
|
$client_ssl_key = "${puppet_home}/ssl/private_keys/${::fqdn}.pem"
|
|||
27e74369 | Lukas Zapletal | ||
222fb5e5 | Adam Heinz | # Set these values if you want Passenger to serve a CA-provided cert instead of puppet's
|
|
$server_ssl_ca = "${puppet_home}/ssl/certs/ca.pem"
|
|||
$server_ssl_cert = "${puppet_home}/ssl/certs/${::fqdn}.pem"
|
|||
$server_ssl_key = "${puppet_home}/ssl/private_keys/${::fqdn}.pem"
|
|||
27e74369 | Lukas Zapletal | # We need the REST API interface with OAuth for some REST Puppet providers
|
|
$oauth_active = true
|
|||
$oauth_map_users = true
|
|||
$oauth_consumer_key = cache_data('oauth_consumer_key', random_password(32))
|
|||
$oauth_consumer_secret = cache_data('oauth_consumer_secret', random_password(32))
|
|||
8c974670 | Ohad Levy | }
|