d5854041f8
Due to an issue where console-services fails to complete about 2 requests after a restart of postgresql, let's go ahead and restart the console-services service if we restart the postgresql service. If the console-services is not on the same node as postgresql then set all_in_one_pe_install to false and console-services will not be restarted.
36 lines
1.1 KiB
Puppet
36 lines
1.1 KiB
Puppet
class profile::pe_postgresql_management (
|
|
$autovacuum_scale_factor = '.01',
|
|
$manage_postgresql_service = true,
|
|
$all_in_one_pe_install = true,
|
|
) {
|
|
|
|
$postgresql_service_resource_name = 'postgresqld'
|
|
$postgresql_service_name = 'pe-postgresql'
|
|
$notify_postgresql_service = $manage_postgresql_service ? {
|
|
true => Service[$postgresql_service_resource_name],
|
|
default => undef,
|
|
}
|
|
$notify_console_services = $all_in_one_pe_install ? {
|
|
true => Service['pe-console-services'],
|
|
default => undef,
|
|
}
|
|
|
|
if $manage_postgresql_service {
|
|
service { $postgresql_service_resource_name :
|
|
name => $postgresql_service_name,
|
|
ensure => running,
|
|
enable => true,
|
|
notify => $notify_console_services
|
|
}
|
|
}
|
|
|
|
#http://www.postgresql.org/docs/9.4/static/runtime-config-autovacuum.html
|
|
postgresql_conf { ['autovacuum_vacuum_scale_factor', 'autovacuum_analyze_scale_factor'] :
|
|
ensure => present,
|
|
target => '/opt/puppetlabs/server/data/postgresql/9.4/data/postgresql.conf',
|
|
value => $autovacuum_scale_factor,
|
|
notify => $notify_postgresql_service,
|
|
}
|
|
|
|
}
|