]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/openssh/recipes/default.rb
Treat ssh as an upstart managed service on 14.04
[chef.git] / cookbooks / openssh / recipes / default.rb
index 79a2dd1fbddb83e08823fd199b2bd1c839cde0e2..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
@@ -48,7 +51,9 @@ end.collect do |node|
   }
 
   if node[:keys][:ssh][:host_ecdsa_public]
-    keys[node[:keys][:ssh][:host_ecdsa_type]] = 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[