puppet: Add postgres config

(imported from commit ca932a1a1af7e7236ff1f47785acf4b412b16650)
This commit is contained in:
Zev Benjamin 2012-12-12 14:14:20 -05:00
parent 155e2c4943
commit 4d2899b5f8
1 changed files with 31 additions and 0 deletions

View File

@ -297,8 +297,39 @@ class humbug_nagios {
#TODO: Need to install our Nagios config
}
class humbug_postgres {
$postgres_packages = [ "postgresql-9.1", "pgtune", ]
package { $postgres_packages: ensure => "installed" }
file { '/etc/sysctl.d/30-postgresql-shm.conf':
ensure => file,
owner => root,
group => root,
mode => 644
}
common::append_if_no_such_line { 'shmmax':
require => Package['postgresql-9.1'],
file => '/etc/sysctl.d/30-postgresql-shm.conf',
line => 'kernel.shmmax = 6979321856'
}
common::append_if_no_such_line { 'shmall':
require => Package['postgresql-9.1'],
file => '/etc/sysctl.d/30-postgresql-shm.conf',
line => 'kernel.shmall = 1703936'
}
exec { "sysctl_p":
command => "sysctl -p /etc/sysctl.d/30-postgresql-shm.conf",
require => [ Common::Append_if_no_such_line['shmmax'],
Common::Append_if_no_such_line['shmall'],
],
}
}
class { "humbug_base": }
#class { "humbug_apache_base": }
#class { "humbug_wiki": }
#class { "humbug_app_frontend": }
#class { "humbug_database": }
#class { "humbug_postgres": }