On Fri, Aug 19, 2011 at 01:22:46AM -0700, Tim Schmeling wrote:
> Hi,
>
> i have written a class called ssh to manage authorized_keys.
>
> First i define my authorized_keys in this array:
> $authorized_key = {
> tim_at_caesium => ".............",}
>
> Then i have a define:
> define authorized_keys($ensure="present", $username) {
> ssh_authorized_key { $name:
> ensure => $ensure,
> type => "ssh-rsa",
> key => $authorized_key[$name],
> user => $username,
> }
> }
>
> And last but not least this case syntax to include my authorized_keys:
> case $hostname{
> my_hostname: {
> authorized_keys { "testuser_at_machine1":
> username=> [ "testuser01","testuser02" ] }
> }
> }
>
>
> When i run puppet on the machine "my_hostname", puppet should installs
> the authorized_key "testuser_at_machine1" at user "testuser01" and
> "testuser02", but only the first user (testuser01) becomes the key.
>
> Can anyone help me, where is my mistake?
>
> Greetz
> Timuser just doesnt take an array. One authorized key resource describes exactly one key in one authorized_key file. -Stefan
pgpR0Wf7oWnXR.pgp
Description: PGP signature
