puppet: Add script for doing Postgres base backups and purging old backups

(imported from commit 93a92729b2e964e054aa1af7bcb8a0bae3fd1b33)
This commit is contained in:
Zev Benjamin
2013-05-10 12:15:51 -04:00
parent 33b3b1fa62
commit 15d13f8f40
2 changed files with 55 additions and 1 deletions

View File

@@ -3,7 +3,7 @@ class humbug::postgres-common {
$postgres_packages = [ "postgresql-9.1", "pgtune", "python-boto",
"python-argparse", "python-gevent",
"lzop", "pv", "hunspell-en-us"]
"lzop", "pv", "hunspell-en-us", "python-dateutil"]
package { $postgres_packages: ensure => "installed" }
exec {"pip_wal-e":
@@ -21,6 +21,15 @@ class humbug::postgres-common {
source => "puppet:///modules/humbug/postgresql/env-wal-e",
}
file { "/usr/local/bin/pg_backup_and_purge.py":
ensure => file,
owner => "root",
group => "postgres",
mode => 754,
source => "puppet:///modules/humbug/postgresql/pg_backup_and_purge.py",
require => File["/usr/local/bin/env-wal-e"],
}
file { "/etc/postgresql/9.1/main/pg_hba.conf":
require => Package["postgresql-9.1"],
ensure => file,