2 define postgres::backup_server::register_backup_clienthost (
3 $sshpubkey = $::postgres_key,
4 $ipaddrlist = join(getfromhash($deprecated::nodeinfo, 'ldap', 'ipHostNumber'), ","),
5 $hostname = $::hostname,
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,
20 $addr = assert_type(String[1], $ipaddrlist)
21 @@concat::fragment { "postgresql::server::backup-source-clienthost::$name::$fqdn":
22 target => $postgres::backup_server::globals::sshkeys_sources ,
24 ${hostname} ${addr} ${sshpubkey}
26 tag => $postgres::backup_server::globals::tag_source_sshkey,