]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/openssh/recipes/default.rb
Link to latest PBF as well.
[chef.git] / cookbooks / openssh / recipes / default.rb
index ceb9a679290b37493768464bba9ca51de4981dec..0bae591ceb4d2ea4c973b202fda626fb517074ad 100644 (file)
@@ -24,6 +24,9 @@ package "openssh-client"
 package "openssh-server"
 
 service "ssh" do
+  if node[:lsb][:release].to_f >= 14.04
+    provider Chef::Provider::Service::Upstart
+  end
   action [ :enable, :start ]
   supports :status => true, :restart => true, :reload => true
 end
@@ -42,11 +45,21 @@ end.collect do |node|
     names |= [ "#{node[:hostname]}.#{node[:networking][:roles][:external][:zone]}.openstreetmap.org" ]
   end
 
+  keys = {
+    "rsa" => node[:keys][:ssh][:host_rsa_public],
+    "dsa" => node[:keys][:ssh][:host_dsa_public]
+  }
+
+  if node[:keys][:ssh][:host_ecdsa_public]
+    ecdsa_type = node[:keys][:ssh][:host_ecdsa_type]
+
+    keys[ecdsa_type] = node[:keys][:ssh][:host_ecdsa_public]
+  end
+
   Hash[
     :names => names.sort,
     :addresses => node.ipaddresses.sort,
-    :rsa => node[:keys][:ssh][:host_rsa_public],
-    :dsa => node[:keys][:ssh][:host_dsa_public]
+    :keys => keys
   ]
 end