X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fpostgres%2Fmanifests%2Fbackup_server.pp;h=2bda5dc9d071ced8fa94d2f2b81a706b0ed9d8ef;hb=872979e8aae8f604651cbc9fb2c07c5c22245714;hp=4fda76054802363d0459b5729b333972cfb117d0;hpb=acafab70dc47db33070f0c8c1306eee0841339c9;p=mirror%2Fdsa-puppet.git diff --git a/modules/postgres/manifests/backup_server.pp b/modules/postgres/manifests/backup_server.pp index 4fda76054..2bda5dc9d 100644 --- a/modules/postgres/manifests/backup_server.pp +++ b/modules/postgres/manifests/backup_server.pp @@ -19,4 +19,30 @@ class postgres::backup_server { content => "20 0 * * 6 debbackup chronic /usr/local/bin/postgres-make-base-backups\n", } } + + file { '/etc/dsa/postgresql-backup': + ensure => 'directory', + } + file { '/usr/local/bin/postgres-make-backup-sshauthkeys': + content => template('postgres/backup_server/postgres-make-backup-sshauthkeys.erb'), + mode => '0555', + notify => Exec['postgres-make-backup-sshauthkeys'], + } + concat { '/etc/dsa/postgresql-backup/sshkeys-sources': + notify => Exec['postgres-make-backup-sshauthkeys'], + } + concat::fragment { 'postgresql-backup/source-sshkeys-header': + target => '/etc/dsa/postgresql-backup/sshkeys-sources', + content => @(EOF), + # + | EOF + order => '00', + } + + Concat::Fragment <<| tag == "postgresql::server::backup-source-sshkey" |>> + + exec { "postgres-make-backup-sshauthkeys": + command => "/usr/local/bin/postgres-make-backup-sshauthkeys", + refreshonly => true, + } }