write vpn config
parent
967fc48329
commit
4346b49e62
@ -0,0 +1,19 @@
|
||||
{{ ansible_managed | comment }}
|
||||
|
||||
[Interface]
|
||||
Address = {{ item.value.ip }}
|
||||
PrivateKey = {{ item.value.private_key }}
|
||||
ListenPort = {{ vpn_port }}
|
||||
|
||||
{% for peer in item.value.peers %}
|
||||
[Peer]
|
||||
Publickey = {{ peer.public_key }}
|
||||
{% if peer.endpoint %}
|
||||
Endpoint = {{peer.endpoint}}:{{ vpn_port }}
|
||||
{% endif %}
|
||||
AllowedIPs = {{peer.allowed_ip}}/{{ peer.allowed_mask }}
|
||||
|
||||
{% endfor %}
|
||||
{% if item.value.keepalive %}
|
||||
PersistentKeepalive = {{ vpn_keepalive_period }}
|
||||
{% endif %}
|
Loading…
Reference in New Issue