end
certificates = search(:node, "letsencrypt:certificates").each_with_object({}) do |n, c|
- c.merge!(n[:letsencrypt][:certificates])
+ n[:letsencrypt][:certificates].each do |name, details|
+ c[name] ||= details.merge(:nodes => [])
+
+ c[name][:nodes] << { :name => n[:fqdn], :address => n[:ipaddress] }
+ end
end
certificates.each do |name, details|