diff options
author | Christian Pointner <equinox@spreadspace.org> | 2022-11-20 23:30:00 +0100 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2022-11-20 23:30:00 +0100 |
commit | 0f6cabbae37d2750a1841d2e1abd07eca064af29 (patch) | |
tree | f20a721e510a85da81428b2f7d9f46ae51614b05 /roles/network/wireguard/p2p/templates/systemd.netdev.j2 | |
parent | wireguard roles: some more cleanups and fixes (diff) |
add wireguard-based remote vpn connections to ch-(pan|mimas)
Diffstat (limited to 'roles/network/wireguard/p2p/templates/systemd.netdev.j2')
-rw-r--r-- | roles/network/wireguard/p2p/templates/systemd.netdev.j2 | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/roles/network/wireguard/p2p/templates/systemd.netdev.j2 b/roles/network/wireguard/p2p/templates/systemd.netdev.j2 index 336fdfb2..3e73f474 100644 --- a/roles/network/wireguard/p2p/templates/systemd.netdev.j2 +++ b/roles/network/wireguard/p2p/templates/systemd.netdev.j2 @@ -7,7 +7,11 @@ Description={{ wireguard_p2p_interface.description }} [WireGuard] +{% if 'priv_key' in wireguard_p2p_interface %} PrivateKey={{ wireguard_p2p_interface.priv_key }} +{% else %} +PrivateKeyFile=/etc/systemd/network/{{ wireguard_p2p_interface.name }}.privkey +{% endif %} {% if 'listen_port' in wireguard_p2p_interface %} ListenPort={{ wireguard_p2p_interface.listen_port }} {% endif %} |