X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fpostgres%2Fmanifests%2Fbackup_source.pp;h=146726ace08e0693398358ae040c9194d44cbd15;hb=6b4cdc62b58751da3d0389be86ff7a40f8386f3b;hp=0c9407bd96d1a093f344941d1794ee3b0f698c37;hpb=f8559e4afebbfb90594bb66fe2c067e08b42a2be;p=mirror%2Fdsa-puppet.git diff --git a/modules/postgres/manifests/backup_source.pp b/modules/postgres/manifests/backup_source.pp index 0c9407bd9..146726ace 100644 --- a/modules/postgres/manifests/backup_source.pp +++ b/modules/postgres/manifests/backup_source.pp @@ -1,4 +1,6 @@ # +# See dsa-wiki input/howto/postgres-backup.creole for some documentation +# class postgres::backup_source { file { "/usr/local/bin/pg-backup-file": mode => '0555', @@ -12,12 +14,7 @@ class postgres::backup_source { content => template('roles/postgresql_server/pg-backup-file.conf.erb'), } - if ! $::postgresql_key { - exec { 'create-postgresql-key': - 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\'', - onlyif => '/usr/bin/getent passwd postgres > /dev/null && ! [ -e /var/lib/postgresql/.ssh/id_rsa ]' - } - } + ssh::keygen {'postgres': } if $::hostname in [melartin, vittoria] { @@ -27,16 +24,20 @@ class postgres::backup_source { } if $::hostname in [buxtehude] { postgres::backup_cluster { $::hostname: - pg_version => '9.6', + pg_version => '11', pg_port => 5433, } postgres::backup_cluster { "${::hostname}-debbugs": - pg_version => '9.6', + pg_version => '11', pg_port => 5441, pg_cluster => 'debbugs', } } if $::hostname in [danzi] { + postgres::backup_cluster { $::hostname: + pg_version => '9.6', + pg_port => 5433, + } postgres::backup_cluster { "${::hostname}-debconf": pg_version => '9.6', pg_port => 5434,