aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/init.pp2
-rw-r--r--plugins/facter/sshkeys.rb5
2 files changed, 4 insertions, 3 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 3b20efb..569b234 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -105,7 +105,7 @@ class sshd::base {
type => ssh-rsa,
key => $sshrsakey_key,
ensure => present,
- require => Package["openssh-client"],
+ require => Package["openssh-clients"],
}
}
}
diff --git a/plugins/facter/sshkeys.rb b/plugins/facter/sshkeys.rb
index abf838c..0e94a03 100644
--- a/plugins/facter/sshkeys.rb
+++ b/plugins/facter/sshkeys.rb
@@ -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