Typo
[mirror/dsa-puppet.git] / modules / portforwarder / templates / authorized_keys.erb
index fe4ac47..c9b69d8 100644 (file)
@@ -1,13 +1,16 @@
 <%=
+lines = []
 config = YAML.load(File.open('/etc/puppet/modules/portforwarder/misc/config.yaml').read)
 config.each_pair do |sourcehost, services|
+       ##lines << "# sourcehost is #{sourcehost}"
        services.each do |service|
-               next if service['target_host'] != hostname
+               ##lines << "# targethost is #{service['target_host']}, my hostname #{hostname}, fqdn is #{fqdn}"
+               next if service['target_host'] != fqdn
 
                sshkey = nil
                remote_ip = keyinfo[sourcehost][0]['ipHostNumber'].join(',')
                forward_to_port = service['target_port']
-               local_bind = 127.0.0.2
+               local_bind = '127.0.0.2'
 
                lines << "# from #{sourcehost} on local port #{service['source_bind_port']}"
                if remote_ip.nil? or forward_to_port.nil? or local_bind.nil?
@@ -19,6 +22,5 @@ config.each_pair do |sourcehost, services|
                end
        end
 end
-lines = []
 lines.join("\n")
 %>