Fix some correctness issues identified by foodcritic
[chef.git] / cookbooks / openssh / recipes / default.rb
index 79a2dd1fbddb83e08823fd199b2bd1c839cde0e2..432da265f91449c33538667d56c43ac215719741 100644 (file)
@@ -48,7 +48,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[