X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fpostgres%2Fmanifests%2Finit.pp;h=d146310122ef13d72dced532f67349b2041cfe2e;hb=d0c098685b92334a611a0c596a35f538b95ead47;hp=4edc5c8a6e95695004b9133c22a6e6f9cf81238b;hpb=3eb533e5499e66423bafdedaf6c7d08ead1772de;p=mirror%2Fdsa-puppet.git diff --git a/modules/postgres/manifests/init.pp b/modules/postgres/manifests/init.pp index 4edc5c8a6..d14631012 100644 --- a/modules/postgres/manifests/init.pp +++ b/modules/postgres/manifests/init.pp @@ -1,17 +1,36 @@ +# class postgres { - munin::check { 'postgres_bgwriter': } - munin::check { 'postgres_connections_db': } + $ensure = ($::postgres) ? { + true => 'present', + default => 'absent' + } + + munin::check { 'postgres_bgwriter': + ensure => $ensure, + } + munin::check { 'postgres_connections_db': + ensure => $ensure, + } munin::check { 'postgres_cache_ALL': + ensure => $ensure, script => 'postgres_cache_' } munin::check { 'postgres_querylength_ALL': + ensure => $ensure, script => 'postgres_querylength_' } munin::check { 'postgres_size_ALL': + ensure => $ensure, script => 'postgres_size_' } file { '/etc/munin/plugin-conf.d/local-postgres': + ensure => $ensure, source => 'puppet:///modules/postgres/plugin.conf', } + file { '/usr/local/sbin/dsa-restart-all-idle-postgres': + ensure => $ensure, + source => 'puppet:///modules/postgres/dsa-restart-all-idle-postgres', + mode => '0555', + } }