remove postgres things if we do not have postgresql
[mirror/dsa-puppet.git] / modules / postgres / manifests / init.pp
1 class postgres {
2         $ensure = ($::postgres) ? {
3                 true    => 'ensure',
4                 default => 'absent'
5         }
6
7         munin::check { 'postgres_bgwriter':
8                 ensure => $ensure,
9                 }
10         munin::check { 'postgres_connections_db':
11                 ensure => $ensure,
12                 }
13         munin::check { 'postgres_cache_ALL':
14                 ensure => $ensure,
15                 script => 'postgres_cache_'
16         }
17         munin::check { 'postgres_querylength_ALL':
18                 ensure => $ensure,
19                 script => 'postgres_querylength_'
20         }
21         munin::check { 'postgres_size_ALL':
22                 ensure => $ensure,
23                 script => 'postgres_size_'
24         }
25
26         file { '/etc/munin/plugin-conf.d/local-postgres':
27                 ensure => $ensure,
28                 source  => 'puppet:///modules/postgres/plugin.conf',
29         }
30 }