{ "Format": "hcl2", "JobID": "hass", "JobModifyIndex": 13992633, "Namespace": "default", "Source": "job \"hass\" {\n # region = \"global\"\n datacenters = [\"dc1\"]\n type = \"service\"\n\n # priority = 50\n\n constraint {\n attribute = \"${attr.kernel.name}\"\n value = \"linux\"\n }\n constraint {\n attribute = \"${attr.unique.hostname}\"\n operator = \"regexp\"\n value = \"odroid.*\"\n }\n // constraint {\n // operator = \"distinct_hosts\"\n // value = \"true\"\n // }\n\n affinity {\n attribute = \"${attr.unique.hostname}\"\n value = \"odroid2\"\n weight = 80\n }\n update {\n # Stagger updates every 60 seconds\n stagger = \"10s\"\n max_parallel = 1\n }\n group \"hass\" {\n count = 1\n\n restart {\n attempts = 99\n interval = \"1h\"\n delay = \"10s\"\n mode = \"delay\"\n }\n\n task \"init\" {\n driver = \"docker\"\n lifecycle {\n hook = \"prestart\"\n sidecar = false\n }\n config {\n memory_hard_limit = \"2048\"\n image_pull_timeout = \"10m\"\n force_pull = false \n image = \"ghcr.io/sstent/rsync\"\n volumes = [\n \"/mnt/configs/${NOMAD_GROUP_NAME}:/config\",\n \"/mnt/Public/config/${NOMAD_GROUP_NAME}:/configbackup\",\n \"/mnt/Public/config/locks:/locks\"\n ]\n\n }\n env {\n DB_NAME = \"home-assistant_v2.db\"\n }\n resources {\n cpu = 20 # 500 MHz\n memory = 20 # 128MB\n }\n// template {\n// data = <