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-01-07 00:23:18 +00:00
|
|
|
image = "iamthefij/unifi-traffic-routes:0.0.2"
|
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
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|