a72cc7c9f0
Prior to this commit if you tried to use the classes `puppetdb::master::routes` or `puppetdb::master::storeconfigs` directly (rather than implicitly through `puppetdb::master::config`), you would get a failure about `puppetdb::params` not having been evaluated. This is because the classes were missing an `inherits` statement; this commit fixes both of them.
35 lines
1.2 KiB
Puppet
35 lines
1.2 KiB
Puppet
# Class: puppetdb::master::routes
|
|
#
|
|
# This class configures the puppet master to use puppetdb as the facts terminus.
|
|
#
|
|
# WARNING: the current implementation simply overwrites your routes.yaml file;
|
|
# if you have an existing routes.yaml file that you are using for other purposes,
|
|
# you should *not* use this.
|
|
#
|
|
# Parameters:
|
|
# ['puppet_confdir'] - The puppet config directory (defaults to /etc/puppet)
|
|
#
|
|
# Actions:
|
|
# - Configures the puppet master to use puppetdb as a facts terminus by
|
|
# overwriting routes.yaml
|
|
#
|
|
# Sample Usage:
|
|
# class { 'puppetdb::master::routes':
|
|
# puppet_confdir => '/etc/puppet'
|
|
# }
|
|
#
|
|
#
|
|
class puppetdb::master::routes(
|
|
$puppet_confdir = $puppetdb::params::puppet_confdir,
|
|
) 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,
|
|
source => 'puppet:///modules/puppetdb/routes.yaml',
|
|
}
|
|
}
|