From 8e8dbc3e651020749eec858c182cd1bf171fc097 Mon Sep 17 00:00:00 2001 From: Ian Fijolek Date: Wed, 17 Jul 2024 20:08:38 -0700 Subject: [PATCH] Clean up of iot block lists --- core/blocky/blocky.nomad | 32 ++++++++++++++++++++++++++++++-- core/blocky/blocky.tf | 1 + core/blocky/config.yml | 10 ++++++---- core/blocky/list-sonos.txt | 2 ++ 4 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 core/blocky/list-sonos.txt diff --git a/core/blocky/blocky.nomad b/core/blocky/blocky.nomad index c15ad39..a967038 100644 --- a/core/blocky/blocky.nomad +++ b/core/blocky/blocky.nomad @@ -14,7 +14,6 @@ job "blocky" { update { max_parallel = 1 - # TODO: maybe switch to service job from system so we can use canary and autorollback auto_revert = true min_healthy_time = "60s" healthy_deadline = "5m" @@ -210,7 +209,36 @@ job "blocky" { {{- end }} EOF destination = "$${NOMAD_TASK_DIR}/wemo.txt" - change_mode = "noop" + change_mode = "script" + + change_script { + command = "/app/blocky" + args = ["lists", "refresh"] + timeout = "20s" + } + + wait { + min = "10s" + max = "20s" + } + } + + template { + data = <