1 # register this host at the backup servers
3 # This class set up the ssh authorization on the backup servers
4 # so this client can push WAL segments.
5 define postgres::backup_server::register_backup_clienthost (
7 include postgres::backup_server::globals
9 $ssh_command = "/usr/local/bin/debbackup-ssh-wrap ${::hostname}"
11 ssh::authorized_key_add { 'register_backup_clienthost':
12 target_user => $postgres::backup_server::globals::backup_unix_user,
13 key => dig($facts, 'ssh_keys_users', 'postgres', 'id_rsa.pub', 'line'),
14 command => $ssh_command,
15 from => $base::public_addresses,
16 collect_tag => $postgres::backup_server::globals::tag_source_sshkey,