Hi Felix, On 02/17/2011 01:36 PM Felix Frank wrote:
[...] > And why would they both be named "jim"? I don't even see why you need > the $systemuser parameter. Just make the resource name be the username > on the system in question. thanks for your support and that you finally came up with the following approach: ------------------------------------------------------------------------ $keys = { "j...@mail.com" => "igbsiabsago...", "j...@mail.com" => "ragpiuebsjndv...", ... } define keygroup($users) { $my_users = regsubst($users, "\$", "-key-$name") ssh_authorized_key { $my_users: key => $keys[$name], name => $name, } } keygroup { "j...@mail.com": users => [ "foo", "bar" ]; "j...@mail.com": users => [ "foo", "bar", "baz" ]; } ------------------------------------------------------------------------ Solving the first problem made another one came up so now I'm searching a way to declare the key-type in addition to the key. That's because not all users might be using keys of type RSA only. Maybe somebody has another idea on how to extend the above mentioned approach? :) Many thanks Jan
signature.asc
Description: OpenPGP digital signature