1 # wrapper for ssh setup for statichosts
2 class staticsync::ssh (
3 Variant[Array[String], String] $add_tag,
6 ssh::keygen { $staticsync::user : }
8 ssh::authorized_key_add { "staticsync-${staticsync::user}":
9 target_user => $staticsync::user,
10 key => dig($facts, 'ssh_keys_users', $staticsync::user, 'id_rsa.pub', 'line'),
11 command => "/usr/local/bin/staticsync-ssh-wrap ${::fqdn}",
12 options => ['restrict','pty'],
13 from => $staticsync::public_addresses,
14 collect_tag => $add_tag,
16 ssh::authorized_key_collect { "staticsync-${staticsync::user}":
17 target_user => $staticsync::user,
18 collect_tag => $collect_tag,