X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/8eedb4e50cd2a739f321291cc2c5d54eb2741215..dd7f629ab3f1404a2a3ea5a9c4e28c416ecb6e3b:/cookbooks/networking/templates/default/wireguard.netdev.erb diff --git a/cookbooks/networking/templates/default/wireguard.netdev.erb b/cookbooks/networking/templates/default/wireguard.netdev.erb index 7866f97a4..248bde252 100644 --- a/cookbooks/networking/templates/default/wireguard.netdev.erb +++ b/cookbooks/networking/templates/default/wireguard.netdev.erb @@ -9,7 +9,7 @@ PrivateKey=<%= IO.read("/var/lib/systemd/wireguard/private.key").chomp %> PrivateKeyFile=/var/lib/systemd/wireguard/private.key <% end -%> ListenPort=51820 -<% node[:networking][:wireguard][:peers].each do |peer| -%> +<% node[:networking][:wireguard][:peers].sort_by { |p| p[:public_key] }.each do |peer| -%> [WireGuardPeer] PublicKey=<%= peer[:public_key] %>