From 7f8c632757246813c0a9fdbf0c26ef036ff396be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Tue, 14 Aug 2018 19:23:47 +0200 Subject: Add wireguard profile --- modules/profile/templates/wireguard/network.conf.erb | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 modules/profile/templates/wireguard/network.conf.erb (limited to 'modules/profile/templates/wireguard') 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 -%> -- cgit v1.2.3