Hi Hiu,
 

> key1=[ 'XXXXXXXX', 'YYYYY', 'ZZZZZZZ']
>
... 

>                 key => $key1,
>
 
http://docs.puppetlabs.com/references/latest/type.html#sshauthorizedkey does 
not suggest that the provider would support an array for key.

I suggest doing something like:

$user = 'user'

ssh_authorized_key {
  "${user}-key1":
    type => 'ssh-rsa',
    user => $user,
    key => $key1;
  "${user}-key2":
    type => 'ssh-rsa',
    user => $user,
    key => $key2;
...
}

or even a define:

$user = 'user'
$keys = [$key1, $key2, ...]

define user_key() {
  ssh_authorized_key { "$user-$name':
    type => 'ssh-rsa',
    user => $user,
    key => $name,
  }
}

user_key { $keys: }

(My puppet code may well contain errors, but should give you the idea)

Cheers,
Paul

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/fbmfqVIH4FYJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to