aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2025-01-01 18:56:29 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2025-01-01 18:56:29 +0100
commit485148048209ae47c1dbf0f4df6f9586335561c4 (patch)
tree42c7db20a77b2bd954eeb8e70abe26f3b66b03dd
parentc42ae9d8b086ae3f2036ad743a324e682e5f4d08 (diff)
downloadinfra-485148048209ae47c1dbf0f4df6f9586335561c4.tar.gz
infra-485148048209ae47c1dbf0f4df6f9586335561c4.tar.bz2
infra-485148048209ae47c1dbf0f4df6f9586335561c4.tar.xz
infra-485148048209ae47c1dbf0f4df6f9586335561c4.zip
zigbee2mqttHEADmaster
-rw-r--r--ansible/group_vars/all/ipam.yml1
-rw-r--r--terraform/dns/dn42.tf7
-rw-r--r--terraform/ipam6/ipam6.tf8
-rw-r--r--terraform/lhn2pi-zigbee2mqtt/main.tf1
-rw-r--r--terraform/lhn2pi-zigbee2mqtt/zigbee2mqtt.tf3
5 files changed, 20 insertions, 0 deletions
diff --git a/ansible/group_vars/all/ipam.yml b/ansible/group_vars/all/ipam.yml
index e025551..7c3bd0b 100644
--- a/ansible/group_vars/all/ipam.yml
+++ b/ansible/group_vars/all/ipam.yml
@@ -49,6 +49,7 @@ ipam6:
range: "fdb1:4242:3538:2008::/64"
hosts:
lhn2pi: "fdb1:4242:3538:2008::ffff"
+ lhn2-z2m: "fdb1:4242:3538:2008:9aed:e460:1711:07dd"
conflatorio: "fdb1:4242:3538:2008:8042:32ff:fe0c:7161"
danneri: "fdb1:4242:3538:2008:9422:d355:95b7:f170"
unifi: "fdb1:4242:3538:2008:5054:ff:fe4d:96c"
diff --git a/terraform/dns/dn42.tf b/terraform/dns/dn42.tf
index 9f70413..1f27821 100644
--- a/terraform/dns/dn42.tf
+++ b/terraform/dns/dn42.tf
@@ -49,6 +49,13 @@ resource "linode_domain_record" "dn42-kv24ix" {
target = "fdb1:4242:3538:2006::ffff"
}
+resource "linode_domain_record" "dn42-lhn2-z2m" {
+ domain_id = linode_domain.root.id
+ name = "lhn2-z2m.dn42"
+ record_type = "AAAA"
+ target = "fdb1:4242:3538:2008:9aed:e460:1711:7dd"
+}
+
resource "linode_domain_record" "dn42-lhn2pi" {
domain_id = linode_domain.root.id
name = "lhn2pi.dn42"
diff --git a/terraform/ipam6/ipam6.tf b/terraform/ipam6/ipam6.tf
index 4b7d494..eada854 100644
--- a/terraform/ipam6/ipam6.tf
+++ b/terraform/ipam6/ipam6.tf
@@ -121,6 +121,10 @@ output "networks" {
address : "fdb1:4242:3538:2008::ffff"
prefix : "128"
}
+ lhn2-z2m = {
+ address : "fdb1:4242:3538:2008:9aed:e460:1711:7dd"
+ prefix : "128"
+ }
conflatorio = {
address : "fdb1:4242:3538:2008:8042:32ff:fe0c:7161"
prefix : "128"
@@ -193,6 +197,10 @@ output "hosts" {
address : "fdb1:4242:3538:2008::ffff"
prefix : "128"
}
+ lhn2-z2m = {
+ address : "fdb1:4242:3538:2008:9aed:e460:1711:7dd"
+ prefix : "128"
+ }
conflatorio = {
address : "fdb1:4242:3538:2008:8042:32ff:fe0c:7161"
prefix : "128"
diff --git a/terraform/lhn2pi-zigbee2mqtt/main.tf b/terraform/lhn2pi-zigbee2mqtt/main.tf
index 009ac7d..4182db8 100644
--- a/terraform/lhn2pi-zigbee2mqtt/main.tf
+++ b/terraform/lhn2pi-zigbee2mqtt/main.tf
@@ -25,6 +25,7 @@ provider "docker" {
locals {
docker_image = "koenkk/zigbee2mqtt:1.42.0"
+ public_ip = module.ipam.hosts.lhn2-z2m.address
}
module "ipam" {
diff --git a/terraform/lhn2pi-zigbee2mqtt/zigbee2mqtt.tf b/terraform/lhn2pi-zigbee2mqtt/zigbee2mqtt.tf
index a77fe95..1e3e1a9 100644
--- a/terraform/lhn2pi-zigbee2mqtt/zigbee2mqtt.tf
+++ b/terraform/lhn2pi-zigbee2mqtt/zigbee2mqtt.tf
@@ -18,10 +18,13 @@ resource "docker_container" "zigbee2mqtt" {
# privileged = true
must_run = true
+ network_mode = "host"
+
ports {
internal = 8080
external = 8080
protocol = "tcp"
+ ip = local.public_ip
}
volumes {