From 9a3a70287bba2b16c824de326971bb84fbb86c24 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 3 Aug 2018 08:35:57 +0100 Subject: [PATCH] Use internal address to check certificates on internal only machines --- cookbooks/letsencrypt/recipes/default.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cookbooks/letsencrypt/recipes/default.rb b/cookbooks/letsencrypt/recipes/default.rb index 5bc9e3313..61a120057 100644 --- a/cookbooks/letsencrypt/recipes/default.rb +++ b/cookbooks/letsencrypt/recipes/default.rb @@ -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 -- 2.39.5