Make sure existing jobs are loaded

This commit is contained in:
IamTheFij 2023-08-03 10:21:34 -07:00
parent d8f8884cb8
commit 946873e5ad
1 changed files with 24 additions and 10 deletions

View File

@ -119,10 +119,10 @@ ${file("${module_path}/jobs/grafana.hcl")}
{{- end }}
{{- end }}
{{ range nomadService "photoprism" -}}
# photoprism .Node {{ .Node }}
{{ range nomadService "lidarr" -}}
# lidarr .Node {{ .Node }}
{{ if eq .Node (env "node.unique.id") -}}
${file("${module_path}/jobs/photoprism.hcl")}
${file("${module_path}/jobs/lidarr.hcl")}
{{- end }}
{{- end }}
@ -133,18 +133,32 @@ ${file("${module_path}/jobs/lldap.hcl")}
{{- end }}
{{- end }}
{{ range nomadService "sonarr" -}}
# sonarr .Node {{ .Node }}
{{ if eq .Node (env "node.unique.id") -}}
${file("${module_path}/jobs/sonarr.hcl")}
{{- end }}
{{- end }}
{{ range nomadService "nzbget" -}}
# nzbget .Node {{ .Node }}
{{ if eq .Node (env "node.unique.id") -}}
${file("${module_path}/jobs/nzbget.hcl")}
{{- end }}
{{- end }}
{{ range nomadService "photoprism" -}}
# photoprism .Node {{ .Node }}
{{ if eq .Node (env "node.unique.id") -}}
${file("${module_path}/jobs/photoprism.hcl")}
{{- end }}
{{- end }}
{{ range nomadService "sabnzbd" -}}
# sabnzbd .Node {{ .Node }}
{{ if eq .Node (env "node.unique.id") -}}
${file("${module_path}/jobs/sabnzbd.hcl")}
{{- end }}
{{- end }}
{{ range nomadService "sonarr" -}}
# sonarr .Node {{ .Node }}
{{ if eq .Node (env "node.unique.id") -}}
${file("${module_path}/jobs/sonarr.hcl")}
{{- end }}
{{- end }}
EOF
destination = "local/node-jobs.hcl"