2022-07-29 20:01:40 +00:00
|
|
|
# module "nextcloud" {
|
|
|
|
# source = "./nextcloud"
|
|
|
|
#
|
|
|
|
# depends_on = [module.databases]
|
|
|
|
# }
|
2022-03-03 17:37:49 +00:00
|
|
|
|
2022-05-18 21:23:28 +00:00
|
|
|
module "backups" {
|
|
|
|
source = "./backups"
|
|
|
|
|
2022-06-23 16:48:01 +00:00
|
|
|
depends_on = [module.databases]
|
2022-05-18 21:23:28 +00:00
|
|
|
}
|
|
|
|
|
2022-04-05 05:20:19 +00:00
|
|
|
module "media" {
|
|
|
|
source = "./media"
|
|
|
|
}
|
|
|
|
|
2022-02-16 17:56:18 +00:00
|
|
|
resource "nomad_job" "whoami" {
|
|
|
|
hcl2 {
|
|
|
|
enabled = true
|
2022-02-27 22:49:00 +00:00
|
|
|
vars = {
|
2022-08-30 22:16:08 +00:00
|
|
|
"count" = 1,
|
|
|
|
# "count" = "${2 * length(data.consul_service.nomad.service)}",
|
2022-02-27 22:49:00 +00:00
|
|
|
}
|
2022-02-16 17:56:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
jobspec = file("${path.module}/whoami.nomad")
|
|
|
|
}
|
2022-08-30 22:16:08 +00:00
|
|
|
|
|
|
|
module "sonarr" {
|
|
|
|
source = "./levant"
|
|
|
|
|
|
|
|
template_path = "service.nomad"
|
|
|
|
variables = {
|
|
|
|
name = "sonarr"
|
|
|
|
image = "linuxserver/sonarr"
|
|
|
|
service_port = 8989
|
|
|
|
ingress = true
|
|
|
|
env = jsonencode({
|
|
|
|
PGID = 100
|
|
|
|
PUID = 1001
|
|
|
|
})
|
|
|
|
host_volumes = jsonencode([
|
|
|
|
{
|
2022-09-04 21:06:12 +00:00
|
|
|
name = "tv-sonarr"
|
|
|
|
dest = "/srv/volumes/media-write/TV Shows"
|
2022-08-30 22:16:08 +00:00
|
|
|
read_only = false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name = "download"
|
|
|
|
dest = "/srv/volumes/download"
|
|
|
|
read_only = false
|
|
|
|
},
|
|
|
|
])
|
|
|
|
}
|
|
|
|
}
|
2022-09-07 00:15:43 +00:00
|
|
|
|
|
|
|
resource "consul_service" "homeassistant" {
|
|
|
|
name = "hass"
|
|
|
|
node = consul_node.homeassistant.name
|
|
|
|
port = 8123
|
|
|
|
tags = [
|
|
|
|
"traefik.enable=true",
|
|
|
|
"traefik.consulcatalog.connect=false",
|
|
|
|
"traefik.http.routers.hass.entryPoints=websecure",
|
|
|
|
]
|
|
|
|
|
|
|
|
check {
|
|
|
|
check_id = "homeassistant:hass"
|
|
|
|
status = "passing"
|
|
|
|
name = "Home Assistant Health Check"
|
|
|
|
http = "192.168.3.65:8123"
|
|
|
|
interval = "30s"
|
|
|
|
timeout = "10s"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "consul_node" "homeassistant" {
|
|
|
|
name = "homeassistant"
|
|
|
|
address = "192.168.3.65"
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
"external-node" = "true"
|
|
|
|
"external-probe" = "true"
|
|
|
|
}
|
|
|
|
}
|