]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/networking/templates/default/wireguard.netdev.erb
Merge remote-tracking branch 'github/pull/701'
[chef.git] / cookbooks / networking / templates / default / wireguard.netdev.erb
index 7f7ef31141d82bfde26e1d42f7827c9634c2e39c..979e68eee2e06cff62bd3b97a256a297edbe6a06 100644 (file)
@@ -5,7 +5,7 @@ Kind=wireguard
 [WireGuard]
 PrivateKeyFile=/var/lib/systemd/wireguard/private.key
 ListenPort=51820
 [WireGuard]
 PrivateKeyFile=/var/lib/systemd/wireguard/private.key
 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] %>
 
 [WireGuardPeer]
 PublicKey=<%= peer[:public_key] %>