37 lines
633 B
HCL
37 lines
633 B
HCL
job "unifi-traffic-route-ips" {
|
|
|
|
type = "batch"
|
|
|
|
periodic {
|
|
cron = "*/15 * * * * *"
|
|
prohibit_overlap = true
|
|
}
|
|
|
|
group "main" {
|
|
|
|
task "main" {
|
|
driver = "docker"
|
|
|
|
config {
|
|
image = "iamthefij/unifi-traffic-routes:0.0.2"
|
|
}
|
|
|
|
env = {
|
|
UNIFI_HOST = "192.168.2.1",
|
|
UNIFI_PORT = "443",
|
|
}
|
|
|
|
template {
|
|
data = <<EOF
|
|
{{ with nomadVar "nomad/jobs/unifi-traffic-route-ips" -}}
|
|
UNIFI_USER={{ .unifi_username }}
|
|
UNIFI_PASS={{ .unifi_password }}
|
|
{{ end -}}
|
|
EOF
|
|
destination = "$${NOMAD_SECRETS_DIR}/env"
|
|
env = true
|
|
}
|
|
}
|
|
}
|
|
}
|