diff --git a/site/profile/manifests/pe_postgresql_management.pp b/site/profile/manifests/pe_postgresql_management.pp new file mode 100644 index 0000000..c4b81c3 --- /dev/null +++ b/site/profile/manifests/pe_postgresql_management.pp @@ -0,0 +1,29 @@ +class profile::pe_postgresql_management ( + $autovacuum_scale_factor = '.01', + $manage_postgresql_service = 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, + } + + if $manage_postgresql_service { + service { $postgresql_service_resource_name : + name => $postgresql_service_name, + ensure => running, + enable => true, + } + } + + #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, + } + +} diff --git a/site/role/manifests/all_in_one_pe.pp b/site/role/manifests/all_in_one_pe.pp index 9e93155..054ef28 100644 --- a/site/role/manifests/all_in_one_pe.pp +++ b/site/role/manifests/all_in_one_pe.pp @@ -2,5 +2,6 @@ class role::all_in_one_pe { include profile::puppetmaster include profile::git_webhook + include profile::pe_postgresql_management }