Remove variables in host definition

Seems like the Icinga configuration parser does not resolve host
variables inside the host definition.
This commit is contained in:
Jan Dittberner 2023-08-17 10:22:42 +02:00
parent 426a5f658e
commit 6886f91f9b

View file

@ -7,10 +7,6 @@ object Host "beholder" {
address = "127.0.0.1" address = "127.0.0.1"
address6 = "::1" address6 = "::1"
vars.external_address = "49.13.65.97"
vars.external_address6 = "2a01:4f8:c17:7495::1"
vars.external_fqdn = "beholder.cacert.org"
vars.disks["/"] = { vars.disks["/"] = {
disk_partitions = "/" disk_partitions = "/"
} }
@ -20,16 +16,16 @@ object Host "beholder" {
vars.http_vhosts["http redirect v4"] = { vars.http_vhosts["http redirect v4"] = {
http_uri = "/" http_uri = "/"
http_address = this.vars.external_address http_address = "49.13.65.97"
http_vhost = this.vars.external_fqdn http_vhost = "beholder.cacert.org"
http_headerstring = "Location: https://" + this.vars.external_fqdn + "/" http_headerstring = "Location: https://beholder.cacert.org/"
http_ipv4 = true http_ipv4 = true
} }
vars.http_vhosts["http redirect v6"] = { vars.http_vhosts["http redirect v6"] = {
http_uri = "/" http_uri = "/"
http_address = this.vars.external_address6 http_address = "2a01:4f8:c17:7495::1"
http_vhost = this.vars.external_fqdn http_vhost = "beholder.cacert.org"
http_headerstring = "Location: https://" + this.vars.external_fqdn + "/" http_headerstring = "Location: https://beholder.cacert.org/"
http_ipv6 = true http_ipv6 = true
} }
} }