2 <%- @ips.each do |ip| -%>
5 PrivateKey = <%= @private_key %>
8 <%- @facts["ldapvar"]["other"].each do |host| -%>
9 <%- if (host["vars"]["wireguard_public"] || []).count > 0 %>
11 # <%= host["vars"]["real_hostname"][0] %>
12 PublicKey = <%= host["vars"]["wireguard_public"][0] %>
13 <%- if (host["vars"]["wireguard_ip"] || []).count > 0 -%>
14 AllowedIps = <%= host["vars"]["wireguard_ip"].join(", ").gsub /\/\d+/, "/32" %>
16 Endpoint = <%= host["vars"]["real_hostname"][0] %>:51820