orchestration-tests/nomad/ddclient.nomad

52 lines
864 B
Plaintext
Raw Permalink Normal View History

2022-07-27 21:45:08 +00:00
job "ddclient" {
datacenters = ["dc1"]
type = "service"
group "ddclient" {
task "ddclient" {
driver = "docker"
config {
image = "linuxserver/ddclient:3.9.1"
mount {
type = "bind"
source = "local/ddclient.conf"
target = "/config/ddclient.conf"
}
}
vault {
policies = [
"access-tables",
"nomad-task",
]
}
template {
data = <<EOH
daemon=900
ssl=yes
use=web
protocol=cloudflare,
ttl=1,
{{ with secret "kv/data/cloudflare" -}}
password={{ .Data.data.api_token_dns_edit_all }}
{{ end -}}
zone={{ key "ddclient/zone" }}
{{ key "ddclient/domain" }}
EOH
destination = "local/ddclient.conf"
change_mode = "restart"
}
resources {
cpu = 50
memory = 20
}
}
}
}