This commit is contained in:
Héctor Molinero Fernández
2020-01-30 21:33:16 +01:00
parent 1abc1d8631
commit 26b9228cf7
21 changed files with 123 additions and 40 deletions

View File

@@ -0,0 +1,17 @@
#cloud-config
write_files:
- path: "/etc/wireguard/wg0-privatekey"
owner: "root:root"
permissions: "0600"
content: |
${wg_server_own_privatekey}
- path: "/etc/wireguard/wg0-peers.conf"
owner: "root:root"
permissions: "0644"
content: |
%{~ for index, pubkey in wg_server_peer_publickeys ~}
[Peer]
PublicKey = ${pubkey}
AllowedIPs = 10.10.10.${index+2}/32, fd10:10:10::${index+2}/128
%{~ endfor ~}