diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-08-18 19:26:35 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-08-18 19:26:35 +0200 |
commit | 6667f52e8017065c9b5f14c8025458b38029a800 (patch) | |
tree | 3819efff8336fdda1fef8fc78fd2fbc0791693af /modules/profile/templates | |
parent | 19c467dccfd00193a66f1341f068987da7bca14b (diff) | |
parent | 3c90c9020fc4e0257fa4c73f14e609e3559b3771 (diff) | |
download | Puppet-6667f52e8017065c9b5f14c8025458b38029a800.tar.gz Puppet-6667f52e8017065c9b5f14c8025458b38029a800.tar.zst Puppet-6667f52e8017065c9b5f14c8025458b38029a800.zip |
Merge branch 'file_store' into dev
Diffstat (limited to 'modules/profile/templates')
-rw-r--r-- | modules/profile/templates/wireguard/network.conf.erb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/modules/profile/templates/wireguard/network.conf.erb b/modules/profile/templates/wireguard/network.conf.erb new file mode 100644 index 0000000..5327dfd --- /dev/null +++ b/modules/profile/templates/wireguard/network.conf.erb | |||
@@ -0,0 +1,19 @@ | |||
1 | [Interface] | ||
2 | <%- @ips.each do |ip| -%> | ||
3 | Address = <%= ip %> | ||
4 | <%- end -%> | ||
5 | PrivateKey = <%= @private_key %> | ||
6 | ListenPort = 51820 | ||
7 | |||
8 | <%- @facts["ldapvar"]["other"].each do |host| -%> | ||
9 | <%- if (host["vars"]["wireguard_public"] || []).count > 0 %> | ||
10 | [Peer] | ||
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" %> | ||
15 | <%- end -%> | ||
16 | Endpoint = <%= host["vars"]["real_hostname"][0] %>:51820 | ||
17 | |||
18 | <% end -%> | ||
19 | <%- end -%> | ||