a826d85735
Currently the module only allows PuppetDB to be configured in a agent/master setup configuration, by configuring the master section of the puppet.conf and applying on the routes for such a configuration. This commit allows one to use this module to configure the main section of the puppet.conf and applying the proper routes so the module can configure nodes to use PuppetDB in a masterless setup. Doc about puppet.conf configure in masterless way available here https://docs.puppetlabs.com/puppetdb/2.2/connect_puppet_apply.html#manage-puppetconf
26 lines
756 B
Puppet
26 lines
756 B
Puppet
# Manage the installation of the report processor on the master. See README.md
|
|
# for more details.
|
|
class puppetdb::master::report_processor (
|
|
$puppet_conf = $puppetdb::params::puppet_conf,
|
|
$masterless = $puppetdb::params::masterless,
|
|
$enable = false
|
|
) inherits puppetdb::params {
|
|
|
|
if $masterless {
|
|
$puppet_conf_section = 'main'
|
|
} else {
|
|
$puppet_conf_section = 'master'
|
|
}
|
|
|
|
ini_subsetting { 'puppet.conf/reports/puppetdb':
|
|
ensure => $enable ? {
|
|
true => present,
|
|
default => absent
|
|
},
|
|
path => $puppet_conf,
|
|
section => $puppet_conf_section,
|
|
setting => 'reports',
|
|
subsetting => 'puppetdb',
|
|
subsetting_separator => ',',
|
|
}
|
|
}
|