2013-08-07 16:32:19 +02:00
|
|
|
# The puppetdb default configuration settings.
|
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
|
2013-05-22 01:35:42 +02:00
|
|
|
$ssl_listen_address = $::fqdn
|
2012-11-13 21:38:38 +01:00
|
|
|
$ssl_listen_port = '8081'
|
2013-04-09 00:39:04 +02:00
|
|
|
$disable_ssl = false
|
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'
|
2013-01-17 18:56:01 +01:00
|
|
|
$open_postgres_port = undef
|
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'
|
2013-08-21 10:36:15 +02:00
|
|
|
$database_ssl = false
|
2012-09-18 02:06:48 +02:00
|
|
|
|
2013-02-05 23:34:48 +01:00
|
|
|
# These settings manage the various auto-deactivation and auto-purge settings
|
2013-04-07 11:56:01 +02:00
|
|
|
$node_ttl = '0s'
|
|
|
|
$node_purge_ttl = '0s'
|
2013-05-03 00:00:00 +02:00
|
|
|
$report_ttl = '14d'
|
2013-02-05 23:34:48 +01: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
|
|
|
$gc_interval = '60'
|
2012-09-18 02:06:48 +02:00
|
|
|
|
2013-08-07 16:32:19 +02:00
|
|
|
$log_slow_statements = '10'
|
|
|
|
$conn_max_age = '60'
|
|
|
|
$conn_keep_alive = '45'
|
|
|
|
$conn_lifetime = '0'
|
|
|
|
|
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: {
|
2013-07-09 22:15:29 +02:00
|
|
|
$firewall_supported = false
|
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'
|
2013-06-04 14:19:53 +02:00
|
|
|
|
2013-02-15 17:16:36 +01:00
|
|
|
case $::osfamily {
|
2013-07-09 22:15:29 +02:00
|
|
|
'RedHat', 'Suse': {
|
2013-02-15 17:16:36 +01:00
|
|
|
$puppetdb_initconf = '/etc/sysconfig/pe-puppetdb'
|
|
|
|
}
|
|
|
|
'Debian': {
|
|
|
|
$puppetdb_initconf = '/etc/default/pe-puppetdb'
|
|
|
|
}
|
|
|
|
default: {
|
|
|
|
fail("${module_name} supports osfamily's RedHat and Debian. Your osfamily is recognized as ${::osfamily}")
|
|
|
|
}
|
2013-06-04 14:19:53 +02:00
|
|
|
}
|
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'
|
2013-06-04 14:19:53 +02:00
|
|
|
|
2013-02-15 17:16:36 +01:00
|
|
|
case $::osfamily {
|
2013-08-19 22:10:41 +02:00
|
|
|
'RedHat', 'Suse', 'Archlinux': {
|
2013-02-15 17:16:36 +01:00
|
|
|
$puppetdb_initconf = '/etc/sysconfig/puppetdb'
|
|
|
|
}
|
|
|
|
'Debian': {
|
|
|
|
$puppetdb_initconf = '/etc/default/puppetdb'
|
|
|
|
}
|
|
|
|
default: {
|
|
|
|
fail("${module_name} supports osfamily's RedHat and Debian. Your osfamily is recognized as ${::osfamily}")
|
|
|
|
}
|
|
|
|
}
|
2012-10-01 20:05:25 +02:00
|
|
|
}
|
|
|
|
|
2012-10-17 02:39:47 +02:00
|
|
|
$puppet_conf = "${puppet_confdir}/puppet.conf"
|
2013-04-15 16:37:58 +02:00
|
|
|
$puppetdb_startup_timeout = 120
|
2013-09-02 11:30:31 +02:00
|
|
|
$puppetdb_service_status = 'running'
|
2012-09-18 00:26:32 +02:00
|
|
|
}
|