-hosts = search(:node, "networking:interfaces").sort_by do |node|
- node[:hostname]
-end.collect do |node|
- names = [ node[:hostname] ]
+hosts = search(:node, "networking:interfaces").sort_by { |n| n[:hostname] }.collect do |node|
+ names = [node[:hostname]]