1
0
Fork 0

Add wireguard_preshared_key variable

This commit is contained in:
Robert Edström 2020-07-16 21:43:52 +09:00
parent d5b81cb75e
commit 026d7124cf
3 changed files with 10 additions and 0 deletions

View file

@ -1,6 +1,10 @@
Changelog
---------
**6.4.0**
- Support specifying optional `wireguard_preshared_key` (contribution by @legogris)
**6.3.1**
- Support Openstack Debian images (contribution by @pallinger)

View file

@ -38,6 +38,9 @@ wireguard_port: "51820"
# The default interface name that wireguard should use if not specified otherwise.
wireguard_interface: "wg0"
# Preshared key to use for all peers (optional)
wireguard_preshared_key: "abc123"
```
The following variable is mandatory and needs to be configured for every host in `host_vars/`:

View file

@ -50,6 +50,9 @@ SaveConfig = true
{% else %}
AllowedIPs = {{hostvars[host].wireguard_ip}}/32
{% endif %}
{% if wireguard_preshared_key is defined %}
PresharedKey = {{wireguard_preshared_key}}
{% endif %}
{% if hostvars[host].wireguard_persistent_keepalive is defined %}
PersistentKeepalive = {{hostvars[host].wireguard_persistent_keepalive}}
{% endif %}