diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-08-14 19:23:47 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-08-14 19:57:25 +0200 |
commit | 7f8c632757246813c0a9fdbf0c26ef036ff396be (patch) | |
tree | b24fc5e4b484e2b576d819146afa47db5758faf5 /modules/profile/templates | |
parent | 9fcc3f8faac4a24fb97fff87a4a49bf362967fa2 (diff) | |
download | Puppet-7f8c632757246813c0a9fdbf0c26ef036ff396be.tar.gz Puppet-7f8c632757246813c0a9fdbf0c26ef036ff396be.tar.zst Puppet-7f8c632757246813c0a9fdbf0c26ef036ff396be.zip |
Add wireguard profile
Diffstat (limited to 'modules/profile/templates')
-rw-r--r-- | modules/profile/templates/wireguard/network.conf.erb | 13 |
1 files changed, 13 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..0528050 --- /dev/null +++ b/modules/profile/templates/wireguard/network.conf.erb | |||
@@ -0,0 +1,13 @@ | |||
1 | [Interface] | ||
2 | <%- @ips.each do |ip| %> | ||
3 | Address = <%= ip %> | ||
4 | <% end -%> | ||
5 | PrivateKey = <%= @private_key %> | ||
6 | |||
7 | <%- @facts["ldapvar"]["other"].each do |host| -%> | ||
8 | <%- if (host["vars"]["wireguard_public"] || []).count > 0 %> | ||
9 | [Peer] | ||
10 | PublicKey = host["vars"]["wireguard_public"][0] | ||
11 | |||
12 | <% end -%> | ||
13 | <%- end -%> | ||