72e1924b11
command-processing section. Added new class server/config_ini.pp to manage contents of the config.ini. Three new parameters added: * command_threads * store_usage * temp_usage All three default to 'undef'. This makes sure (potential) custom settings done to that file with regard to above three variables are 'absent', and let PuppetDB built-in defaults take care. Documentation to the README.md added, as well as unit tests. My use-case was, that I have on some nodes a too small /var partition, so I had to lower the values of store-usage and temp-usage in the config.ini manually.
58 lines
1.5 KiB
Puppet
58 lines
1.5 KiB
Puppet
# PRIVATE CLASS - do not use directly
|
|
class puppetdb::server::config_ini (
|
|
$command_threads = $puppetdb::params::command_threads,
|
|
$store_usage = $puppetdb::params::store_usage,
|
|
$temp_usage = $puppetdb::params::temp_usage,
|
|
$confdir = $puppetdb::params::confdir,
|
|
) inherits puppetdb::params {
|
|
|
|
|
|
file { "${confdir}/config.ini":
|
|
ensure => 'present',
|
|
mode => '0644',
|
|
}
|
|
|
|
# Set the defaults
|
|
Ini_setting {
|
|
path => "${confdir}/config.ini",
|
|
ensure => 'present',
|
|
section => 'command-processing',
|
|
require => File["${confdir}/config.ini"],
|
|
}
|
|
|
|
if $command_threads {
|
|
ini_setting { 'puppetdb_config_command_processing_threads':
|
|
setting => 'threads',
|
|
value => $command_threads,
|
|
}
|
|
} else {
|
|
ini_setting { 'puppetdb_config_command_processing_threads':
|
|
ensure => 'absent',
|
|
setting => 'threads',
|
|
}
|
|
}
|
|
|
|
if $store_usage {
|
|
ini_setting { 'puppetdb_config_command_processing_store_usage':
|
|
setting => 'store-usage',
|
|
value => $store_usage,
|
|
}
|
|
} else {
|
|
ini_setting { 'puppetdb_config_command_processing_store_usage':
|
|
ensure => 'absent',
|
|
setting => 'store-usage',
|
|
}
|
|
}
|
|
|
|
if $temp_usage {
|
|
ini_setting { 'puppetdb_config_command_processing_temp_usage':
|
|
setting => 'temp-usage',
|
|
value => $temp_usage,
|
|
}
|
|
} else {
|
|
ini_setting { 'puppetdb_config_command_processing_temp_usage':
|
|
ensure => 'absent',
|
|
setting => 'temp-usage',
|
|
}
|
|
}
|
|
}
|