Issue #7009 has been updated by Jeff McCune.

# Bump #

I just ran into this as well.  I think the solution is to not alias the key 
with the comment.  We should support multiple resources with different titles 
using the same key and comment.

<pre>
[root@centos56 ~]# puppet apply -v  --graph --graphdir /vagrant/tmp/$(facter 
hostname) --modulepath /vagrant/modules 
/vagrant/modules/accounts/tests/init_yaml.pp
Puppet::Parser::AST::Resource failed with error ArgumentError: Cannot alias 
Ssh_authorized_key[[email protected]] to 
["[email protected]"]; resource ["Ssh_authorized_key", 
["[email protected]"]] already exists at 
/vagrant/modules/accounts/manifests/init.pp:134 on node centos56.localdomain
</pre>
----------------------------------------
Bug #7009: Puppet ssh_authorized_keys fails on one account if key with same 
name exists in another account
https://projects.puppetlabs.com/issues/7009

Author: John Goerzen
Status: Accepted
Priority: Normal
Assignee: Ben Hughes
Category: 
Target version: 
Affected Puppet version: 2.6.2
Keywords: 
Branch: 


Hello,

I have been trying to debug this very strange error:

err: /Stage[main]/Accounts::Human::Sshkeys/Ssh_authorized_key[jgoerzen@wile]: 
Could not evaluate: No such file or directory - 
/home/jgoerzen/.ssh/authorized_keys

I observed that it went away if I changed the name "jgoerzen@wile" to 
"jgoerzen@wile2" in my Puppet .pp files.

This is a "virtual" resource (defined with an @) that is, of course, realized.  
This bug is a bit finicky and sometimes doesn't present itself; it seems to be 
less likely to present itself if used without being virtual.

I completely rebuilt the Puppet client node multiple times trying to track this 
down.  Here's what seems to be the cause:

 * Puppet is creating the jgoerzen user directly, and ssh_authorized_keys is 
creating the single entry jgoerzen@wile for that account.
 * Puppet also manages root's authorized_keys file.  Puppet has been configured 
to add two entries to it, unrelated to jgoerzen@wile.
 * Before installing Puppet, /root/.ssh/authorized_keys already contained an 
entry for jgoerzen@wile.  Puppet contained no instructions for what to do with 
this entry and left it in root's authorized_keys file.
 * This appears to have caused a great deal of confusion.  If I rename this 
entry in root's authorized_keys file (again, outside Puppet, since Puppet 
wasn't putting it there), then jgoerzen's authorized_keys file is created as 
appropriate.

I could make the error go away by manually creating ~jgoerzen/.ssh and 
~jgoerzen/.ssh/authorized_keys, but even if I did that, Puppet still wasn't 
putting the key in it.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" 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-bugs?hl=en.

Reply via email to