Hi:

I have a defined type "useraccount" that constructs a user and user's
group, then installs his ssh key. This looks something like the
snippet below.

The problem I'm seeing is, every time I run the puppet client, it
appends that same ssh key to ~/.ssh/authorized_keys, so at the end of
three runs I have three copies of the same key in the file.

Is there a workaround? Maybe something with subscribe or refreshonly?
Am I using the resource incorrectly?

Thank you,
/m


# /etc/puppet/modules/user/init.pp

define useraccount ($uid, $username) {
   user { $username:
       ensure => present,
       ...
   }

   group { ... }

   ssh_authorized_key { $username:
       ensure => present,
       key => "abcdefghijklmnop_very_long_string",
   }
}



-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
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