Commit 4712d6be authored by nanahira's avatar nanahira

dns

parent 3e66b113
......@@ -7,7 +7,7 @@ FwMark = {{conn.localGatewayMark}}
{% endif %}
MTU = {{conn.mtu|int - 80}}
Table = off
{% if dns is defined and (inventory_hostname_short == "103" and conn.name == "mc-drjin" or inventory_hostname_short == "218" and conn.name != "mc-drjin") %}
{% if dns != "" and (inventory_hostname_short == "103" and conn.name == "mc-drjin" or inventory_hostname_short == "218" and conn.name != "mc-drjin") %}
DNS = {{dns}}
{% endif %}
PostUp = dev=%i localPeerAddress={{conn.localPeerAddress}} remotePeerAddress={{conn.remotePeerAddress}} remoteMark={{conn.remoteMark}} inbound={{conn.inbound}} outbound={{conn.outbound}} mtu={{conn.mtu|int - 80}} /etc/wireguard/postup.sh
......
......@@ -9,7 +9,7 @@ FwMark = {{conn.localGatewayMark}}
{% endif %}
MTU = {{conn.mtu|int - 80}}
Table = off
{% if dns is defined and (inventory_hostname_short == "103" and conn.name == "mc-drjin" or inventory_hostname_short == "218" and conn.name != "mc-drjin") %}
{% if dns != "" and (inventory_hostname_short == "103" and conn.name == "mc-drjin" or inventory_hostname_short == "218" and conn.name != "mc-drjin") %}
DNS = {{dns}}
{% endif %}
PostUp = dev=%i localPeerAddress={{conn.localPeerAddress}} remotePeerAddress={{conn.remotePeerAddress}} remoteMark={{conn.remoteMark}} inbound={{conn.inbound}} outbound={{conn.outbound}} mtu={{conn.mtu|int - 80}} /etc/wireguard/postup.sh
......
......@@ -83,7 +83,7 @@ class InventoryBuilder {
const connections = [];
const null_connection = "10000,null";
const lan_interfaces = host.lan_interfaces.length > 0 ? host.lan_interfaces.split(",") : [];
const dns = host.dns.length > 0 ? host.dns : undefined;
const dns = host.dns;
for (const h of this.connections) {
if (h != host.name) {
const to = host[h];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment