X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;ds=sidebyside;f=modules%2Fpostgres%2Fmanifests%2Finit.pp;h=4c28750592720e78f51dd4118d775326e2d904c5;hb=ab982a3ba02cff2448d33cd21a641dee1c76b0d2;hp=534e21f9df40f5ec52d4f949f3d2613dd88d2a2a;hpb=0808c559c2a168b04b2e4478d52281a477ef6a03;p=mirror%2Fdsa-puppet.git diff --git a/modules/postgres/manifests/init.pp b/modules/postgres/manifests/init.pp index 534e21f9d..4c2875059 100644 --- a/modules/postgres/manifests/init.pp +++ b/modules/postgres/manifests/init.pp @@ -1,30 +1,38 @@ +# base class for a host with postgres installed +# +# This just provides some common infrastructure and monitoring. class postgres { - $ensure = ($::postgres) ? { - true => 'present', - default => 'absent' - } + $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_' - } + 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 { '/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', + } }