Add wireguard_preshared_key variable
This commit is contained in:
parent
d5b81cb75e
commit
026d7124cf
|
@ -1,6 +1,10 @@
|
||||||
Changelog
|
Changelog
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
**6.4.0**
|
||||||
|
|
||||||
|
- Support specifying optional `wireguard_preshared_key` (contribution by @legogris)
|
||||||
|
|
||||||
**6.3.1**
|
**6.3.1**
|
||||||
|
|
||||||
- Support Openstack Debian images (contribution by @pallinger)
|
- Support Openstack Debian images (contribution by @pallinger)
|
||||||
|
|
|
@ -38,6 +38,9 @@ wireguard_port: "51820"
|
||||||
|
|
||||||
# The default interface name that wireguard should use if not specified otherwise.
|
# The default interface name that wireguard should use if not specified otherwise.
|
||||||
wireguard_interface: "wg0"
|
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/`:
|
The following variable is mandatory and needs to be configured for every host in `host_vars/`:
|
||||||
|
|
|
@ -50,6 +50,9 @@ SaveConfig = true
|
||||||
{% else %}
|
{% else %}
|
||||||
AllowedIPs = {{hostvars[host].wireguard_ip}}/32
|
AllowedIPs = {{hostvars[host].wireguard_ip}}/32
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if wireguard_preshared_key is defined %}
|
||||||
|
PresharedKey = {{wireguard_preshared_key}}
|
||||||
|
{% endif %}
|
||||||
{% if hostvars[host].wireguard_persistent_keepalive is defined %}
|
{% if hostvars[host].wireguard_persistent_keepalive is defined %}
|
||||||
PersistentKeepalive = {{hostvars[host].wireguard_persistent_keepalive}}
|
PersistentKeepalive = {{hostvars[host].wireguard_persistent_keepalive}}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Reference in a new issue