2012-09-18 00:26:32 +02:00
|
|
|
# Class: puppetdb::params
|
|
|
|
#
|
|
|
|
# The puppetdb configuration settings.
|
|
|
|
#
|
|
|
|
# Parameters:
|
|
|
|
#
|
|
|
|
# Actions:
|
|
|
|
#
|
|
|
|
# Requires:
|
|
|
|
#
|
|
|
|
# Sample Usage:
|
|
|
|
#
|
2012-06-15 00:04:42 +02:00
|
|
|
class puppetdb::params {
|
2012-11-13 21:38:38 +01:00
|
|
|
$listen_address = 'localhost'
|
|
|
|
$listen_port = '8080'
|
|
|
|
$open_listen_port = false
|
|
|
|
$ssl_listen_address = $::clientcert
|
|
|
|
$ssl_listen_port = '8081'
|
2013-01-17 02:52:11 +01:00
|
|
|
$open_ssl_listen_port = undef
|
2012-11-13 21:38:38 +01:00
|
|
|
$postgres_listen_addresses = 'localhost'
|
2012-11-29 14:46:05 +01:00
|
|
|
$open_postgres_port = true
|
2012-09-18 00:26:32 +02:00
|
|
|
|
2012-11-13 21:38:38 +01:00
|
|
|
$database = 'postgres'
|
2012-09-18 00:26:32 +02:00
|
|
|
|
2012-09-20 23:46:26 +02:00
|
|
|
# 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'
|
2012-09-18 02:06:48 +02:00
|
|
|
|
2012-09-20 23:46:26 +02:00
|
|
|
$puppetdb_version = 'present'
|
2012-09-19 00:52:10 +02:00
|
|
|
|
2012-09-20 23:46:26 +02:00
|
|
|
# TODO: figure out a way to make this not platform-specific
|
2013-01-17 02:52:11 +01:00
|
|
|
$manage_redhat_firewall = undef
|
2012-09-18 02:06:48 +02:00
|
|
|
|
2012-09-20 23:46:26 +02:00
|
|
|
$gc_interval = '60'
|
2012-09-18 02:06:48 +02:00
|
|
|
|
2012-09-20 23:46:26 +02:00
|
|
|
case $::osfamily {
|
|
|
|
'RedHat': {
|
|
|
|
$firewall_supported = true
|
|
|
|
$persist_firewall_command = '/sbin/iptables-save > /etc/sysconfig/iptables'
|
|
|
|
}
|
2012-09-18 02:06:48 +02:00
|
|
|
|
2012-09-20 23:46:26 +02:00
|
|
|
'Debian': {
|
|
|
|
$firewall_supported = false
|
|
|
|
# TODO: not exactly sure yet what the right thing to do for Debian/Ubuntu is.
|
|
|
|
#$persist_firewall_command = '/sbin/iptables-save > /etc/iptables/rules.v4'
|
|
|
|
}
|
|
|
|
default: {
|
|
|
|
fail("${module_name} supports osfamily's RedHat and Debian. Your osfamily is recognized as ${::osfamily}")
|
2012-09-18 02:06:48 +02:00
|
|
|
}
|
2012-09-20 23:46:26 +02:00
|
|
|
}
|
2012-09-19 02:21:42 +02:00
|
|
|
|
2012-10-01 20:05:25 +02:00
|
|
|
if $::puppetversion =~ /Puppet Enterprise/ {
|
|
|
|
$puppetdb_package = 'pe-puppetdb'
|
|
|
|
$puppetdb_service = 'pe-puppetdb'
|
|
|
|
$confdir = '/etc/puppetlabs/puppetdb/conf.d'
|
|
|
|
$puppet_service_name = 'pe-httpd'
|
|
|
|
$puppet_confdir = '/etc/puppetlabs/puppet'
|
|
|
|
$terminus_package = 'pe-puppetdb-terminus'
|
2012-10-17 22:28:01 +02:00
|
|
|
$embedded_subname = 'file:/opt/puppet/share/puppetdb/db/db;hsqldb.tx=mvcc;sql.syntax_pgs=true'
|
2012-10-01 20:05:25 +02:00
|
|
|
} else {
|
|
|
|
$puppetdb_package = 'puppetdb'
|
|
|
|
$puppetdb_service = 'puppetdb'
|
|
|
|
$confdir = '/etc/puppetdb/conf.d'
|
|
|
|
$puppet_service_name = 'puppetmaster'
|
|
|
|
$puppet_confdir = '/etc/puppet'
|
|
|
|
$terminus_package = 'puppetdb-terminus'
|
2012-10-17 22:28:01 +02:00
|
|
|
$embedded_subname = 'file:/usr/share/puppetdb/db/db;hsqldb.tx=mvcc;sql.syntax_pgs=true'
|
2012-10-01 20:05:25 +02:00
|
|
|
}
|
|
|
|
|
2012-10-17 02:39:47 +02:00
|
|
|
$puppet_conf = "${puppet_confdir}/puppet.conf"
|
|
|
|
$puppetdb_startup_timeout = 15
|
2012-09-18 00:26:32 +02:00
|
|
|
}
|