From bee9b641cc0c52d6c941677feadbd45d615bea45 Mon Sep 17 00:00:00 2001 From: Ian Fijolek Date: Tue, 15 Nov 2022 08:53:32 -0800 Subject: [PATCH] Fix local dns in docker --- ansible_playbooks/setup-cluster.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ansible_playbooks/setup-cluster.yml b/ansible_playbooks/setup-cluster.yml index e86ad5e..fc0a5b8 100644 --- a/ansible_playbooks/setup-cluster.yml +++ b/ansible_playbooks/setup-cluster.yml @@ -58,11 +58,12 @@ # 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 + # Actually, we should point to our external Nomad address so that Docker uses it - name: Update resolv.conf lineinfile: dest: /etc/resolv.conf create: true - line: "nameserver 127.0.0.1" + line: "nameserver {{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}" become: true - name: Setup Vault cluster