From 609944df8e057d5057c58bd1ec8037ea1bc65774 Mon Sep 17 00:00:00 2001 From: Ian Fijolek Date: Thu, 23 Jun 2022 20:12:09 -0700 Subject: [PATCH] Install consul dns forwarding --- setup-cluster.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/setup-cluster.yml b/setup-cluster.yml index 5917811..65f9692 100644 --- a/setup-cluster.yml +++ b/setup-cluster.yml @@ -35,6 +35,18 @@ telemetry: prometheus_retention_time: "2h" + # DNS forwarding + consul_dnsmasq_enable: true + consul_dnsmasq_servers: + # TODO: use addresses of other nomad nodes? + # Maybe this can be [] to get the values from dhcp + - 1.1.1.1 + - 1.0.0.1 + consul_dnsmasq_bind_interfaces: true + consul_dnsmasq_listen_addresses: + # Listen only to loopback interface + - 127.0.0.1 + become: true tasks: @@ -44,6 +56,9 @@ name: consul become: true + # If DNS is broken after dnsmasq, then need to set /etc/resolv.conf to something + # pointing to 127.0.0.1 and possibly restart Docker and Nomad + - name: Add values block: - name: Install python-consul