add dns configuration

This commit is contained in:
Antonio J. Delgado 2023-08-09 14:49:11 +03:00
parent 0c065e13b0
commit aad339d855

View file

@ -1,8 +1,8 @@
[Interface]
Address = {% for item in wireguard_peers %}{% if item['name'] == inventory_hostname %}{{ item['AllowedIPs'] }}
{% endif %}{% endfor %}
Address = {% for item in wireguard_peers %}{% if item['name'] == inventory_hostname %}{{ item['AllowedIPs'] }}{% endif %}{% endfor %}
PrivateKey = {{ private_key }}
ListenPort = {{ listenport }}
DNS = {% if vpn_dns is defined %}{{ vpn_dns }}{% else %}{{ server_address }}{% endif %}
{% for item in wireguard_peers %}{% if item['name'] != inventory_hostname and 'PublicKey' in item and 'AllowedIPs' in item %}