Make sure existing jobs are loaded

This commit is contained in:
IamTheFij 2023-08-03 10:21:34 -07:00
parent d8f8884cb8
commit 946873e5ad

View File

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