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:
29 if $::hostname in [melartin, vittoria, godard] {
30 postgres::backup_server::register_backup_clienthost { "backup-clienthost-${::fqdn}}":