X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fpostgres%2Fmanifests%2Fbackup_source.pp;h=d2443a187ad346769c32642ad93853fb1f5f0a6b;hb=8b411205b3bf9d12a86333b37fc1d37375d5fe52;hp=d67f6756e3c59c5fff400092c85acf68c04903fe;hpb=d8771588931a22ede77529bb5ac4ca9340123516;p=mirror%2Fdsa-puppet.git diff --git a/modules/postgres/manifests/backup_source.pp b/modules/postgres/manifests/backup_source.pp index d67f6756e..d2443a187 100644 --- a/modules/postgres/manifests/backup_source.pp +++ b/modules/postgres/manifests/backup_source.pp @@ -14,12 +14,7 @@ class postgres::backup_source { content => template('roles/postgresql_server/pg-backup-file.conf.erb'), } - if ! $::postgres_key { - exec { 'create-postgres-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] { @@ -50,8 +45,17 @@ class postgres::backup_source { } } - if $::hostname in [melartin, vittoria, godard, buxtehude, danzi] { + if $::hostname in [postgresql-manda-01] { + postgres::backup_cluster { "${::hostname}-bacula": + pg_version => '11', + pg_port => 5432, + pg_cluster => 'bacula', + } + } + + if $::hostname in [melartin, vittoria, godard, buxtehude, danzi, postgresql-manda-01] { postgres::backup_server::register_backup_clienthost { "backup-clienthost-${::fqdn}}": } } + }