]> git.openstreetmap.org Git - chef.git/commitdiff
Sort certificates in a stable order
authorTom Hughes <tom@compton.nu>
Fri, 26 Jan 2018 15:34:13 +0000 (15:34 +0000)
committerTom Hughes <tom@compton.nu>
Fri, 26 Jan 2018 15:34:13 +0000 (15:34 +0000)
cookbooks/letsencrypt/templates/default/check-certificates.erb

index d07bacf5c56e338451acda43a6e1110281041ebb..06f4f0a98fec704f3e39f2de4b622391d4a047de 100644 (file)
@@ -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 -%>