On Tue, Oct 09, 2012 at 03:46:36PM +0100, Klaus Ethgen
wrote:> I have a setup where I construct the host_aliases of sshkey. This work
> fine. But now I encounter that several (not all) keys are changed every
> run of puppet:
> notice: /Stage[main]/Ssh/Sshkey[XXXXXX.XXX.XXrsa]/host_aliases:
host_aliases changed ''XXXXXX257.257.257.257'' to
''XXXXXX 257.257.257.257''
>
> I changed the name part to Xes and the IP to 257.257.257.257, but they
> are the correct IP and name of one host.
>
> So why is this happening? Except from the fact that the first output is
> not separated by space and the second is. (In the file
> /etc/ssh/sshd_known_hosts all entries are separated correctly by coma.)
>
> It seems not have to do with versions of puppet. I use versions 2.7.6,
> 2.6.16, 0.25.4 and 2.7.11.
>
> I tried to debug this to find where the decision is made to replace an
> entry but failed to find.
>
> Any Idea?
>
It''s a bit hard to debug your problem without seeing the actual line in
your /etc/ssh/ssh_known_hosts file. If you dont want to paste it please
do this:
extract the complete line from the target file. Now run
# irb
irb> line = ''your actual line''
irb> fields = line.split(/\s+/)
# you should now see an array. The first item should be hostname and
# all aliases
irb> name = fields[0]
irb> name.split('','')
What do you see after executing the last line? You should see something
like [ "name", "host_alias1", "host_alias2" ]
-Stefan
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.