module-puppetdb/manifests/master/routes.pp
Ken Barber f6f6e55b33 Cleanups, missing doc items and new test_url capability
This provides a number of cleanups as the code has been unloved for a while.

I've added the ssl-* parameters the robinbowes added in his last patch to the
docs, and found some other cleanups as well where applicable.

I've added the ability to override the test_url also, so that in the future
if a user wishes to they can customize this.

Signed-off-by: Ken Barber <ken@bob.sh>
2014-10-07 15:06:54 +01:00

24 lines
800 B
Puppet

# Manages the routes configuration file on the master. See README.md for more
# details.
class puppetdb::master::routes (
$puppet_confdir = $puppetdb::params::puppet_confdir,
$routes = {
'master' => {
'facts' => {
'terminus' => 'puppetdb',
'cache' => 'yaml',
}
}
}
) inherits puppetdb::params {
# TODO: this will overwrite any existing routes.yaml;
# to handle this properly we should just be ensuring
# that the proper settings exist, but to do that we'd need
# to parse the yaml file and rewrite it, dealing with indentation issues etc.
# I don't think there is currently a puppet module or an augeas lens for this.
file { "${puppet_confdir}/routes.yaml":
ensure => file,
content => template('puppetdb/routes.yaml.erb'),
}
}