Thanks you felix for answer me. I owe you another one. The bad news I tried resources { "ssh_authorized_key": purge => true } but don't result.
The good one is templates are great for it. I appreciate your help, Bests regards, eduardo. On 13 jun, 03:34, Felix Frank <felix.fr...@alumni.tu-berlin.de> wrote: > Hi, > > On 06/12/2012 07:39 PM, eduardo wrote: > > > Hi all, > > > How to refresh ssh/authorized_keys file content ? > > > I'm trying massive loading keys. I need refresh authorized_keys file > > content. > > > I try delete file before call ssh_authorized_key : > > please don't. This is *not* how you are supposed to interact with > authorized keys. > > Either use the ssh_autherized_key type *or* fiddle with the file, but > don't mix them. > > > exec { "del_${user_local}_authorized_keys": > > command => "rm /home/$user_local/.ssh/ > > authorized_keys ; touch /home/$user_local/.ssh/authorized_keys ; chown > > $user_local:$user_local /home/$user_local/.ssh/authorized_keys", > > path => '/bin:/usr/bin', > > } > > > First run only delete file and in the second one I got desired > > result. > > > I think is possible create content file using template but before > > leave ssh_authorized_key resource type way I want to know any other > > chance. > > A template would work. > > You can also try simply pruning all unmanaged keys, so puppet will clear > all unwanted stuff out. Take note that this will affect keys of *all* > users (I believe), so you have to manage all keys on the system in question. > > resources { "ssh_authorized_key": purge => true } > > HTH, > Felix -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.