1 class postgres::backup_server {
2 package { 'postgresql-client-9.1':
5 package { 'postgresql-client-9.4':
9 file { '/usr/local/bin/postgres-make-base-backups':
10 content => template('postgres/backup_server/postgres-make-base-backups.erb'),
13 if $::hostname in [backuphost] {
14 file { '/etc/cron.d/puppet-postgres-make-base-backups':
15 content => "20 1 * * 0 debbackup chronic /usr/local/bin/postgres-make-base-backups\n",
18 file { '/etc/cron.d/puppet-postgres-make-base-backups':
19 content => "20 0 * * 6 debbackup chronic /usr/local/bin/postgres-make-base-backups\n",
23 file { '/etc/dsa/postgresql-backup':
24 ensure => 'directory',
26 file { '/usr/local/bin/postgres-make-backup-sshauthkeys':
27 content => template('postgres/backup_server/postgres-make-backup-sshauthkeys.erb'),
29 notify => Exec['postgres-make-backup-sshauthkeys'],
31 file { '/etc/dsa/postgresql-backup/sshkeys-manual':
32 content => template('postgres/backup_server/sshkeys-manual.erb'),
33 notify => Exec['postgres-make-backup-sshauthkeys'],
35 concat { '/etc/dsa/postgresql-backup/sshkeys-sources':
36 notify => Exec['postgres-make-backup-sshauthkeys'],
38 concat::fragment { 'postgresql-backup/source-sshkeys-header':
39 target => '/etc/dsa/postgresql-backup/sshkeys-sources',
41 # <name> <ip addresses> <key>
46 Concat::Fragment <<| tag == "postgresql::server::backup-source-sshkey" |>>
48 exec { "postgres-make-backup-sshauthkeys":
49 command => "/usr/local/bin/postgres-make-backup-sshauthkeys",