2023-11-20 18:37:03 +00:00
|
|
|
job "unifi-traffic-route-ips" {
|
|
|
|
|
|
|
|
type = "batch"
|
|
|
|
|
|
|
|
periodic {
|
|
|
|
cron = "*/15 * * * * *"
|
|
|
|
prohibit_overlap = true
|
|
|
|
}
|
|
|
|
|
2024-05-28 18:45:30 +00:00
|
|
|
meta = {
|
|
|
|
"diun.enable" = false
|
|
|
|
}
|
|
|
|
|
2023-11-20 18:37:03 +00:00
|
|
|
group "main" {
|
|
|
|
|
|
|
|
task "main" {
|
|
|
|
driver = "docker"
|
|
|
|
|
|
|
|
config {
|
2024-10-02 18:29:24 +00:00
|
|
|
image = "iamthefij/unifi-traffic-routes:0.0.4"
|
2023-11-20 18:37:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|