From 9b2abddf2004a1424175886a6e853304717cb0fe Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 26 Jan 2018 15:34:13 +0000 Subject: [PATCH] Sort certificates in a stable order --- .../letsencrypt/templates/default/check-certificates.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cookbooks/letsencrypt/templates/default/check-certificates.erb b/cookbooks/letsencrypt/templates/default/check-certificates.erb index d07bacf5c..06f4f0a98 100644 --- a/cookbooks/letsencrypt/templates/default/check-certificates.erb +++ b/cookbooks/letsencrypt/templates/default/check-certificates.erb @@ -1,7 +1,7 @@ #!/bin/sh -<% @certificates.each_value do |certificate| -%> -<% certificate[:nodes].each do |host| -%> +<% @certificates.values.sort_by { |c| c[:domains].first }.each do |certificate| -%> +<% certificate[:nodes].sort_by { |h| h[:name] }.each do |host| -%> /srv/acme.openstreetmap.org/bin/check-certificate <%= host[:name] %> <%= host[:address] %> <%= certificate[:domains].join(" ") %> <% end -%> <% end -%> -- 2.39.5