From e78b09f51ce578d6396f7938f4adeb83299ec6a1 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Sun, 3 Sep 2023 16:43:58 +0200 Subject: [PATCH] Allow to customize job name --- unifi.nomad.hcl | 4 +++- variables.yml | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/unifi.nomad.hcl b/unifi.nomad.hcl index 82c5204..0cc532a 100644 --- a/unifi.nomad.hcl +++ b/unifi.nomad.hcl @@ -1,4 +1,4 @@ -job "unifi" { +job [[ .unifi.job_name | toJSON ]] { [[- template "common/job_start.tpl" . ]] @@ -53,6 +53,7 @@ job "unifi" { ] } +[[- if not .unifi.controller.mongo.is_external ]] service { name = "unifi-mongo[[ .env.suffix ]]" port = 27017 @@ -71,6 +72,7 @@ job "unifi" { } } } +[[- end ]] volume "unifi-data" { type = [[ .unifi.controller.volume.type | toJSON ]] diff --git a/variables.yml b/variables.yml index cb49d07..07536bb 100644 --- a/variables.yml +++ b/variables.yml @@ -7,6 +7,8 @@ # - A firmware downloader helper : this is because the Unifi Controller can't use an outbound web proxy unifi: + # The name of the nomad job + job_name: unifi # This is for the web management console controller: