Fix backup conditionals

This commit is contained in:
IamTheFij 2023-03-24 23:34:23 -07:00
parent f1098d6448
commit 8e3fbcedb9

View File

@ -114,41 +114,39 @@ RCLONE_FTP_NO_CHECK_CERTIFICATE=true
template {
# Build jobs based on node
data = <<EOF
# Current node is {{ env "node.unique.name" }}
{{ range nomadService "nextcloud" -}}
# nextcloud .Node {{ .Node }}
{{ if eq .NodeId (env "node.unique.id") -}}
${file("${module_path}/jobs/nextcloud.hcl")}
{{- end }}
{{- end }}
# Current node is {{ env "node.unique.name" }} {{ env "node.unique.id" }}
{{ range nomadService "grafana" -}}
{{ if eq .NodeId (env "node.unique.id") -}}
# grafana .Node {{ .Node }}
{{ if eq .Node (env "node.unique.id") -}}
${file("${module_path}/jobs/grafana.hcl")}
{{- end }}
{{- end }}
{{ range nomadService "photoprism" -}}
{{ if eq .NodeId (env "node.unique.id") -}}
# photoprism .Node {{ .Node }}
{{ if eq .Node (env "node.unique.id") -}}
${file("${module_path}/jobs/photoprism.hcl")}
{{- end }}
{{- end }}
{{ range service "lldap" -}}
{{ if eq .NodeId (env "node.unique.id") -}}
{{ range nomadService "lldap" -}}
# lldap .Node {{ .Node }}
{{ if eq .Node (env "node.unique.id") -}}
${file("${module_path}/jobs/lldap.hcl")}
{{- end }}
{{- end }}
{{ range service "sonarr" -}}
{{ if eq .NodeId (env "node.unique.id") -}}
{{ range nomadService "sonarr" -}}
# sonarr .Node {{ .Node }}
{{ if eq .Node (env "node.unique.id") -}}
${file("${module_path}/jobs/sonarr.hcl")}
{{- end }}
{{- end }}
{{ range service "nzbget" -}}
{{ if eq .NodeId (env "node.unique.id") -}}
{{ range nomadService "nzbget" -}}
# nzbget .Node {{ .Node }}
{{ if eq .Node (env "node.unique.id") -}}
${file("${module_path}/jobs/nzbget.hcl")}
{{- end }}
{{- end }}