Move the backup of the pg instance on danzi to a more hiera and facter based setup
[mirror/dsa-puppet.git] / modules / postgres / manifests / backup_source.pp
1 #
2 # See dsa-wiki input/howto/postgres-backup.creole for some documentation
3 #
4 class postgres::backup_source {
5   file { '/usr/local/bin/pg-backup-file':
6     mode   => '0555',
7     source => 'puppet:///modules/roles/postgresql_server/pg-backup-file',
8   }
9   file { '/usr/local/bin/pg-receive-file-from-backup':
10     mode   => '0555',
11     source => 'puppet:///modules/roles/postgresql_server/pg-receive-file-from-backup',
12   }
13   file { '/etc/dsa/pg-backup-file.conf':
14     content => template('roles/postgresql_server/pg-backup-file.conf.erb'),
15   }
16
17   ssh::keygen {'postgres': }
18
19
20   if $::hostname in [godard] {
21     postgres::backup_server::register_backup_clienthost { "backup-clienthost-${::fqdn}}":
22     }
23   }
24 }