Working ddclient.

This commit is contained in:
Greyscale 2025-02-14 21:23:19 +01:00
parent 6f0cb5a988
commit eeca39baa8
Signed by: grey
GPG key ID: DDB392AE64B32D89
3 changed files with 13 additions and 2 deletions

View file

@ -1,5 +1,6 @@
# General Configuration
daemon=300
daemon=${interval}
syslog=yes
# Router
usev4=${router}
@ -10,4 +11,4 @@ protocol=${protocol}
%{ if password != null }password=${password}%{ endif }
%{ if apikey != null }apikey=${apikey}%{ endif }
%{ if secretapikey != null }secretapikey=${secretapikey}%{ endif }
${domain}
%{ if onrootdomain == true }on-root-domain=yes %{ endif }${domain}

View file

@ -15,6 +15,7 @@ module "service" {
#}
secrets = {
"/defaults/ddclient.conf" = templatefile("${path.module}/ddclient.conf.tpl", {
interval = var.interval_seconds
protocol = var.protocol
router = var.router
login = var.login
@ -22,6 +23,7 @@ module "service" {
apikey = var.apikey
secretapikey = var.secretapikey
domain = var.domain
onrootdomain = var.onrootdomain
})
}
environment_variables = {

View file

@ -1,3 +1,7 @@
variable "interval_seconds" {
default = 300
type = number
}
variable "stack_name" {
default = "dns"
type = string
@ -18,6 +22,10 @@ variable "router" {
variable "domain" {
type = string
}
variable "onrootdomain" {
default = false
type = bool
}
variable "login" {
type = string
default = null