X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fpostgres%2Fmanifests%2Fbackup_server.pp;h=bf8efa04210dd3411f76dcd154d085e2c9d56aaa;hb=7f9dfc2720855047ffada44ed914fc3b30a41079;hp=6d9b79289a0fcb9f095312faf24b16fb8803f16e;hpb=b3d748149a3204479e9cb6787a7caf668488d8f8;p=mirror%2Fdsa-puppet.git diff --git a/modules/postgres/manifests/backup_server.pp b/modules/postgres/manifests/backup_server.pp index 6d9b79289..bf8efa042 100644 --- a/modules/postgres/manifests/backup_server.pp +++ b/modules/postgres/manifests/backup_server.pp @@ -44,37 +44,14 @@ class postgres::backup_server { # # do not let other hosts directly build our authorized_keys file, # instead go via a script that somewhat validates intput - 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'], + file { '/usr/local/bin/debbackup-ssh-wrap': + source => 'puppet:///modules/postgres/backup_server/debbackup-ssh-wrap', + mode => '0555' } file { '/usr/local/bin/postgres-make-one-base-backup': source => 'puppet:///modules/postgres/backup_server/postgres-make-one-base-backup', mode => '0555' } - file { '/etc/dsa/postgresql-backup/sshkeys-manual': - content => template('postgres/backup_server/sshkeys-manual.erb'), - notify => Exec['postgres-make-backup-sshauthkeys'], - } - concat { $postgres::backup_server::globals::sshkeys_sources: - notify => Exec['postgres-make-backup-sshauthkeys'], - } - concat::fragment { 'postgresql-backup/source-sshkeys-header': - target => $postgres::backup_server::globals::sshkeys_sources , - content => @(EOF), - # - | EOF - order => '00', - } - Concat::Fragment <<| tag == $postgres::backup_server::globals::tag_source_sshkey |>> - exec { 'postgres-make-backup-sshauthkeys': - command => '/usr/local/bin/postgres-make-backup-sshauthkeys', - refreshonly => true, - } ssh::authorized_key_collect { 'postgres::backup_server': target_user => $postgres::backup_server::globals::backup_unix_user, collect_tag => $postgres::backup_server::globals::tag_source_sshkey, @@ -83,6 +60,9 @@ class postgres::backup_server { #### # Maintain /etc/nagios/dsa-check-backuppg.conf # + file { '/etc/dsa/postgresql-backup': + ensure => 'directory', + } file { '/etc/dsa/postgresql-backup/dsa-check-backuppg.conf.d': ensure => 'directory', purge => true,