2014-10-07 16:06:54 +02:00
|
|
|
# Manage the puppetdb.conf file on the puppeet master. See README.md for more
|
2013-10-21 17:21:12 +02:00
|
|
|
# details.
|
2013-10-17 17:49:47 +02:00
|
|
|
class puppetdb::master::puppetdb_conf (
|
|
|
|
$server = 'localhost',
|
|
|
|
$port = '8081',
|
2014-10-07 16:06:54 +02:00
|
|
|
$soft_write_failure = $puppetdb::disable_ssl ? {
|
|
|
|
true => true,
|
|
|
|
default => false,
|
|
|
|
},
|
2013-10-21 17:21:12 +02:00
|
|
|
$puppet_confdir = $puppetdb::params::puppet_confdir,
|
2015-06-18 22:45:51 +02:00
|
|
|
$legacy_terminus = $puppetdb::params::terminus_package ? {
|
|
|
|
/(puppetdb-terminus)/ => true,
|
|
|
|
default => false,
|
|
|
|
},
|
|
|
|
) inherits puppetdb::params {
|
2012-09-18 00:26:32 +02:00
|
|
|
|
2012-09-20 23:46:26 +02:00
|
|
|
Ini_setting {
|
|
|
|
ensure => present,
|
|
|
|
section => 'main',
|
|
|
|
path => "${puppet_confdir}/puppetdb.conf",
|
|
|
|
}
|
2012-09-18 00:26:32 +02:00
|
|
|
|
2015-06-16 19:44:15 +02:00
|
|
|
if $legacy_terminus {
|
|
|
|
ini_setting { 'puppetdbserver':
|
|
|
|
setting => 'server',
|
|
|
|
value => $server,
|
|
|
|
}
|
|
|
|
ini_setting { 'puppetdbport':
|
|
|
|
setting => 'port',
|
|
|
|
value => $port,
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
ini_setting { 'puppetdbserver_urls':
|
|
|
|
setting => 'server_urls',
|
|
|
|
value => "https://${server}:${port}/",
|
|
|
|
}
|
2012-09-20 23:46:26 +02:00
|
|
|
}
|
2013-10-17 17:49:47 +02:00
|
|
|
|
|
|
|
ini_setting { 'soft_write_failure':
|
|
|
|
setting => 'soft_write_failure',
|
|
|
|
value => $soft_write_failure,
|
|
|
|
}
|
2012-09-18 00:26:32 +02:00
|
|
|
}
|