X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=modules%2Fprofile%2Ftemplates%2Fwireguard%2Fnetwork.conf.erb;fp=modules%2Fprofile%2Ftemplates%2Fwireguard%2Fnetwork.conf.erb;h=0528050ca89ff5b5b7f81b2e9384dab0f8c95d8c;hb=7f8c632757246813c0a9fdbf0c26ef036ff396be;hp=0000000000000000000000000000000000000000;hpb=9fcc3f8faac4a24fb97fff87a4a49bf362967fa2;p=perso%2FImmae%2FProjets%2FPuppet.git diff --git a/modules/profile/templates/wireguard/network.conf.erb b/modules/profile/templates/wireguard/network.conf.erb new file mode 100644 index 0000000..0528050 --- /dev/null +++ b/modules/profile/templates/wireguard/network.conf.erb @@ -0,0 +1,13 @@ +[Interface] +<%- @ips.each do |ip| %> +Address = <%= ip %> +<% end -%> +PrivateKey = <%= @private_key %> + +<%- @facts["ldapvar"]["other"].each do |host| -%> +<%- if (host["vars"]["wireguard_public"] || []).count > 0 %> +[Peer] +PublicKey = host["vars"]["wireguard_public"][0] + +<% end -%> +<%- end -%>