2 class postgres::backup_source {
3 file { "/usr/local/bin/pg-backup-file":
5 source => "puppet:///modules/roles/postgresql_server/pg-backup-file",
7 file { "/usr/local/bin/pg-receive-file-from-backup":
9 source => "puppet:///modules/roles/postgresql_server/pg-receive-file-from-backup",
11 file { "/etc/dsa/pg-backup-file.conf":
12 content => template('roles/postgresql_server/pg-backup-file.conf.erb'),
15 if ! $::postgresql_key {
16 exec { 'create-postgresql-key':
17 command => '/bin/su - postgres -c \'mkdir -p -m 02700 .ssh && ssh-keygen -C "`whoami`@`hostname` (`date +%Y-%m-%d`)" -P "" -f .ssh/id_rsa -q\'',
18 onlyif => '/usr/bin/getent passwd postgres > /dev/null && ! [ -e /var/lib/postgresql/.ssh/id_rsa ]'
23 if $::hostname in [melartin, vittoria] {
24 postgres::backup_cluster { $::hostname:
28 if $::hostname in [buxtehude] {
29 postgres::backup_cluster { $::hostname:
33 postgres::backup_cluster { "${::hostname}-debbugs":
36 pg_cluster => 'debbugs',
39 if $::hostname in [danzi] {
40 postgres::backup_cluster { $::hostname:
44 postgres::backup_cluster { "${::hostname}-debconf":
47 pg_cluster => 'debconf',
51 if $::hostname in [melartin, vittoria, godard, buxtehude, danzi] {
52 postgres::backup_server::register_backup_clienthost { "backup-clienthost-${::fqdn}}":