Sort git server firewall rules by node name
[chef.git] / 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