module-puppetdb/manifests/params.pp
Andrew Roetker b95fc919b7 (maint) Add pathing for AIO, defaulting to non-AIO for older PDBs
This commit adds a globals class to PuppetDB which allows us to change
the param defaults for the module depending on what version of PuppetDB
they are using (similar to the PostgreSQL module).
This commit also changes the default PuppetDB 3.x configuration pathing
to assume AIO Puppet.
2015-06-24 14:55:09 +01:00

148 lines
5.3 KiB
Puppet

# PRIVATE CLASS - do not use directly
#
# The puppetdb default configuration settings.
class puppetdb::params inherits puppetdb::globals {
$listen_address = 'localhost'
$listen_port = '8080'
$open_listen_port = false
$ssl_listen_address = '0.0.0.0'
$ssl_listen_port = '8081'
$ssl_protocols = undef
$disable_ssl = false
$open_ssl_listen_port = undef
$postgres_listen_addresses = 'localhost'
$puppetdb_version = $puppetdb::globals::version
$database = $puppetdb::globals::database
$manage_dbserver = true
$manage_pg_repo = false
$postgres_version = '9.4'
# The remaining database settings are not used for an embedded database
$database_host = 'localhost'
$database_port = '5432'
$database_name = 'puppetdb'
$database_username = 'puppetdb'
$database_password = 'puppetdb'
$database_ssl = false
$database_validate = true
# These settings manage the various auto-deactivation and auto-purge settings
$node_ttl = '0s'
$node_purge_ttl = '0s'
$report_ttl = '14d'
$gc_interval = '60'
$log_slow_statements = '10'
$conn_max_age = '60'
$conn_keep_alive = '45'
$conn_lifetime = '0'
$max_threads = undef
# These settings are for the read database
$read_database = 'postgres'
$read_database_host = undef
$read_database_port = '5432'
$read_database_name = 'puppetdb'
$read_database_username = 'puppetdb'
$read_database_password = 'puppetdb'
$read_database_ssl = false
$read_database_validate = true
$read_log_slow_statements = '10'
$read_conn_max_age = '60'
$read_conn_keep_alive = '45'
$read_conn_lifetime = '0'
$manage_firewall = true
$java_args = {}
$puppetdb_package = 'puppetdb'
$puppetdb_service = 'puppetdb'
$puppetdb_user = 'puppetdb'
$puppetdb_group = 'puppetdb'
$masterless = false
if !($puppetdb_version in ['latest','present','absent']) and versioncmp($puppetdb_version, '3.0.0') < 0 {
case $::osfamily {
'RedHat', 'Suse', 'Archlinux','Debian': {
$confdir = '/etc/puppetdb/conf.d'
$database_embedded_path = '/var/lib/puppetdb/db/db'
$puppet_confdir = pick($settings::confdir,'/etc/puppet')
$puppet_service_name = 'puppetmaster'
$ssl_dir = '/etc/puppetdb/ssl'
}
'OpenBSD': {
$confdir = '/etc/puppetdb/conf.d'
$database_embedded_path = '/var/db/puppetdb/db/db'
$puppet_confdir = pick($settings::confdir,'/etc/puppet')
$puppet_service_name = 'puppetmasterd'
$ssl_dir = '/etc/puppetdb/ssl'
}
'FreeBSD': {
$confdir = '/usr/local/etc/puppetdb/conf.d'
$database_embedded_path = '/var/db/puppetdb/db/db'
$puppet_confdir = pick($settings::confdir,'/usr/local/etc/puppet')
$puppet_service_name = 'puppetmaster'
$ssl_dir = '/usr/local/etc/puppetdb/ssl'
}
}
$terminus_package = 'puppetdb-terminus'
$test_url = '/v3/version'
} else {
case $::osfamily {
'RedHat', 'Suse', 'Archlinux','Debian': {
$confdir = '/etc/puppetlabs/puppetdb/conf.d'
$puppet_confdir = pick($settings::confdir,'/etc/puppetlabs/puppet')
$puppet_service_name = 'puppetserver'
$ssl_dir = '/etc/puppetlabs/puppetdb/ssl'
}
'OpenBSD': {
$confdir = '/etc/puppetlabs/puppetdb/conf.d'
$puppet_confdir = pick($settings::confdir,'/etc/puppetlabs/puppet')
$puppet_service_name = undef
$ssl_dir = '/etc/puppetlabs/puppetdb/ssl'
}
'FreeBSD': {
$confdir = '/usr/local/etc/puppetlabs/puppetdb/conf.d'
$puppet_confdir = pick($settings::confdir,'/usr/local/etc/puppetlabs/puppet')
$puppet_service_name = undef
$ssl_dir = '/usr/local/etc/puppetlabs/puppetdb/ssl'
}
}
$terminus_package = 'puppetdb-termini'
$test_url = '/pdb/meta/v1/version'
$database_embedded_path = '/opt/puppetlabs/server/data/puppetdb/db/db'
}
case $::osfamily {
'RedHat', 'Suse', 'Archlinux': {
$puppetdb_initconf = '/etc/sysconfig/puppetdb'
}
'Debian': {
$puppetdb_initconf = '/etc/default/puppetdb'
}
'OpenBSD','FreeBSD': {
$puppetdb_initconf = undef
}
}
$puppet_conf = "${puppet_confdir}/puppet.conf"
$puppetdb_startup_timeout = 120
$puppetdb_service_status = 'running'
$command_threads = undef
$store_usage = undef
$temp_usage = undef
$ssl_set_cert_paths = false
$ssl_cert_path = "${ssl_dir}/public.pem"
$ssl_key_path = "${ssl_dir}/private.pem"
$ssl_ca_cert_path = "${ssl_dir}/ca.pem"
$ssl_deploy_certs = false
$ssl_key = undef
$ssl_cert = undef
$ssl_ca_cert = undef
}