]> gitweb.fluxo.info Git - puppet-sshd.git/commitdiff
fixed fact as centos doesn't seem to add the hostname to the hostkey, fixed package...
authormh <mh@d66ca3ae-40d7-4aa7-90d4-87d79ca94279>
Fri, 25 Jul 2008 11:17:06 +0000 (11:17 +0000)
committermh <mh@d66ca3ae-40d7-4aa7-90d4-87d79ca94279>
Fri, 25 Jul 2008 11:17:06 +0000 (11:17 +0000)
git-svn-id: https://svn/ipuppet/trunk/modules/sshd@1994 d66ca3ae-40d7-4aa7-90d4-87d79ca94279

manifests/init.pp
plugins/facter/sshkeys.rb

index 3b20efbf3fb7ff3a5c501f55da285f42cf41d17e..569b234dcb97d12f973242985e800cbe3026bd2f 100644 (file)
@@ -105,7 +105,7 @@ class sshd::base {
                 type => ssh-rsa,
                 key => $sshrsakey_key,
                 ensure => present,
-                require => Package["openssh-client"],
+                require => Package["openssh-clients"],
             }
         }
     }
index abf838cebde396117612c9dbcb52d83f9a9f5ea3..0e94a0313e04515621e0a4afcc6fb126e4cb96f8 100644 (file)
@@ -6,10 +6,11 @@
                 value = nil
                 filepath = File.join(dir,file)
                 if FileTest.file?(filepath)
-                    regex = %r{^(\S+) (\S+) (\S+)$}
+                    regex1 = %r{^(\S+) (\S+) (\S+)$}
+                    regex2 = %r{^(\S+) (\S+)(\s+)$}
                     begin
                         line = File.open(filepath).read.chomp
-                        if match = regex.match(line)
+                        if (match = regex1.match(line)) or (match = regex2.match(line))
                             value = match[2]
                         end
                     rescue