Add role
This commit is contained in:
16
templates/wg.conf.j2
Normal file
16
templates/wg.conf.j2
Normal file
@@ -0,0 +1,16 @@
|
||||
[Interface]
|
||||
PrivateKey = {{ priv_key.stdout }}
|
||||
ListenPort = {{ wireguard_listenport }}
|
||||
|
||||
{% for peer in wireguard_peers %}
|
||||
[Peer]
|
||||
PublicKey = {{ peer.publickey }}
|
||||
{% if peer.presharedkey is defined %}
|
||||
PresharedKey = {{ peer.presharedkey }}
|
||||
{% endif %}
|
||||
{% if peer.endpoint is defined -%}
|
||||
Endpoint = {{ peer.endpoint }}
|
||||
{%- endif %}
|
||||
AllowedIPs = {{ peer.allowedips | join(', ') }}
|
||||
|
||||
{% endfor %}
|
||||
Reference in New Issue
Block a user