]> git.openstreetmap.org Git - chef.git/commitdiff
Sort git server firewall rules by node name
authorTom Hughes <tom@compton.nu>
Sun, 16 Oct 2016 20:38:55 +0000 (21:38 +0100)
committerTom Hughes <tom@compton.nu>
Sun, 16 Oct 2016 20:38:55 +0000 (21:38 +0100)
cookbooks/git/recipes/server.rb

index c8077a3032b8356ebd0f2cac837324d041b7da67..e87575c735dd560e9b0ead4e05365f075def2123 100644 (file)
@@ -29,7 +29,7 @@ directory git_directory do
 end
 
 if node[:git][:allowed_nodes]
-  search(:node, node[:git][:allowed_nodes]).each do |n|
+  search(:node, node[:git][:allowed_nodes]).sort_by { |n| n[:fqdn] }.each do |n|
     n.interfaces(:role => :external).each do |interface|
       firewall_rule "accept-git" do
         action :accept