]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/letsencrypt/recipes/default.rb
Use internal address to check certificates on internal only machines
[chef.git] / cookbooks / letsencrypt / recipes / default.rb
index 5bc9e33137258bdae58636e09080b58b18d2fa2c..61a12005757a4b7f14bd9fce6ed85bd06f0e312e 100644 (file)
@@ -124,7 +124,10 @@ 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.external_ipaddress }
+    c[name][:nodes] << {
+      :name => n[:fqdn],
+      :address => n.external_ipaddress || n.internal_ipaddress
+    }
   end
 end