From fd731971d3207727b0e78c42bd8e99b2dcfbfaab Mon Sep 17 00:00:00 2001 From: Ian Fijolek Date: Sun, 27 Nov 2022 22:46:25 -0800 Subject: [PATCH] Try to stabilize DNS Add all cluster nodes to each nodes resolv.conf and update blocky config template to delay render on update to avoid unnecessary restarts --- ansible_playbooks/setup-cluster.yml | 3 ++- core/blocky/blocky.nomad | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ansible_playbooks/setup-cluster.yml b/ansible_playbooks/setup-cluster.yml index baa8d4f..bf3186e 100644 --- a/ansible_playbooks/setup-cluster.yml +++ b/ansible_playbooks/setup-cluster.yml @@ -63,7 +63,8 @@ lineinfile: dest: /etc/resolv.conf create: true - line: "nameserver {{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}" + line: "nameserver {{ hostvars[item].ansible_default_ipv4.address }}" + loop: "{{ ansible_play_hosts }}" become: true - name: Setup Vault cluster diff --git a/core/blocky/blocky.nomad b/core/blocky/blocky.nomad index 1b07113..dde5980 100644 --- a/core/blocky/blocky.nomad +++ b/core/blocky/blocky.nomad @@ -129,6 +129,11 @@ job "blocky" { data = var.config_data destination = "app/config.yml" splay = "1m" + + wait { + min = "10s" + max = "20s" + } } }