diff options
author | binary <me@rgoncalves.se> | 2020-11-12 14:29:49 +0100 |
---|---|---|
committer | binary <me@rgoncalves.se> | 2020-11-12 14:29:49 +0100 |
commit | b419094cda74405eb4cbb8b7031b53cd2f347566 (patch) | |
tree | e3e6de54517612ebc96a6d3804848637562103a4 /roles/wireguard/templates/host.conf.j2 | |
parent | 9007e995ed14f92af8fe57fbe9ced0047d2a5634 (diff) | |
download | infrastructure-b419094cda74405eb4cbb8b7031b53cd2f347566.tar.gz |
Refactor and cleanup old roles
Diffstat (limited to 'roles/wireguard/templates/host.conf.j2')
-rw-r--r-- | roles/wireguard/templates/host.conf.j2 | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/roles/wireguard/templates/host.conf.j2 b/roles/wireguard/templates/host.conf.j2 new file mode 100644 index 0000000..c25d937 --- /dev/null +++ b/roles/wireguard/templates/host.conf.j2 @@ -0,0 +1,15 @@ + +# wireguard client configuration ~~ /etc/wireguard/*.conf +# managed by Ansible +{% set host_keys = lookup("file", wg_host_keys).splitlines() %} +{% set dcontroller_keys = lookup("file", wg_dcontroller_keys).splitlines() %} + +[Interface] +Address = {{ ip.in }} +PrivateKey = {{ host_keys[0] }} + +[Peer] +PublicKey = {{ dcontroller_keys[1] }} +Endpoint = {{ hostvars[_i.dcontroller].ip.out }}:53 +AllowedIPs = 0.0.0.0/0, ::/0 +PersistentKeepalive = 25 |