2015-04-08 16:29:03 +02:00
|
|
|
# PRIVATE CLASS - do not use directly
|
2015-09-16 00:21:33 +02:00
|
|
|
class puppetdb::server::command_processing (
|
2015-04-08 16:29:03 +02:00
|
|
|
$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 {
|
|
|
|
|
2016-05-13 21:23:49 +02:00
|
|
|
$config_ini = "${confdir}/config.ini"
|
|
|
|
|
2015-04-08 16:29:03 +02:00
|
|
|
# Set the defaults
|
|
|
|
Ini_setting {
|
2016-05-13 21:23:49 +02:00
|
|
|
path => $config_ini,
|
2015-04-08 16:29:03 +02:00
|
|
|
ensure => 'present',
|
|
|
|
section => 'command-processing',
|
2016-05-13 21:23:49 +02:00
|
|
|
require => File[$config_ini],
|
2015-04-08 16:29:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if $command_threads {
|
2015-09-16 00:21:33 +02:00
|
|
|
ini_setting { 'puppetdb_command_processing_threads':
|
2015-04-08 16:29:03 +02:00
|
|
|
setting => 'threads',
|
|
|
|
value => $command_threads,
|
|
|
|
}
|
|
|
|
} else {
|
2015-09-16 00:21:33 +02:00
|
|
|
ini_setting { 'puppetdb_command_processing_threads':
|
2015-04-08 16:29:03 +02:00
|
|
|
ensure => 'absent',
|
|
|
|
setting => 'threads',
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if $store_usage {
|
2015-09-16 00:21:33 +02:00
|
|
|
ini_setting { 'puppetdb_command_processing_store_usage':
|
2015-04-08 16:29:03 +02:00
|
|
|
setting => 'store-usage',
|
|
|
|
value => $store_usage,
|
|
|
|
}
|
|
|
|
} else {
|
2015-09-16 00:21:33 +02:00
|
|
|
ini_setting { 'puppetdb_command_processing_store_usage':
|
2015-04-08 16:29:03 +02:00
|
|
|
ensure => 'absent',
|
|
|
|
setting => 'store-usage',
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if $temp_usage {
|
2015-09-16 00:21:33 +02:00
|
|
|
ini_setting { 'puppetdb_command_processing_temp_usage':
|
2015-04-08 16:29:03 +02:00
|
|
|
setting => 'temp-usage',
|
|
|
|
value => $temp_usage,
|
|
|
|
}
|
|
|
|
} else {
|
2015-09-16 00:21:33 +02:00
|
|
|
ini_setting { 'puppetdb_command_processing_temp_usage':
|
2015-04-08 16:29:03 +02:00
|
|
|
ensure => 'absent',
|
|
|
|
setting => 'temp-usage',
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|