Re: [Puppet Users] Re: ssh_authorized_key runs every time

Stefan Schulte
Fri, 25 Feb 2011 21:00:31 -0000

On Thu, Feb 24, 2011 at 01:57:14PM -0800, mark risher
wrote:
> Thanks, but I do have those parameters; I was trying to keep my quote
> short. Here''s the full monty:
>
>     # create an ssh key for this user
>     ssh_authorized_key { "$username.$ssh_public_key":
>         ensure      => present,
>         key         => $ssh_public_key,
>         type        => $ssh_key_type,
>         user        => $username,
>     }
>

Thats a strange title. The title of the resource is basically the
comment field in authorized_keys and should be not contain spaces or
commas or anything fancy.

If you still have problems post the exact resource definition (with resolved
variables) and the entry in authorized_keys that puppet actually writes
to disk.

> It seems that this duplication happens when I run "puppetd --test --
> debug"; maybe that test flag overrides the checksumming?

No. If puppet rewrites the same entry over and over again it cannot
identify your resource. That can happen if you use delimiters like
spaces as values.

-Stefan