Improve determination of external IP addresses for certificate checks
authorTom Hughes <tom@compton.nu>
Sat, 28 Jul 2018 08:53:40 +0000 (09:53 +0100)
committerTom Hughes <tom@compton.nu>
Sat, 28 Jul 2018 08:53:40 +0000 (09:53 +0100)
cookbooks/letsencrypt/recipes/default.rb

index 92c8311debb0a7d8ef33bfbf5823dc6f6f03b1ae..5bc9e33137258bdae58636e09080b58b18d2fa2c 100644 (file)
@@ -124,7 +124,7 @@ certificates = search(:node, "letsencrypt:certificates").each_with_object({}) do
   n[:letsencrypt][:certificates].each do |name, details|
     c[name] ||= details.merge(:nodes => [])
 
-    c[name][:nodes] << { :name => n[:fqdn], :address => n[:ipaddress] }
+    c[name][:nodes] << { :name => n[:fqdn], :address => n.external_ipaddress }
   end
 end