Fix consul backup

This commit is contained in:
IamTheFij 2022-07-25 16:29:06 -07:00
parent dcfe43f63d
commit 7acca6d160
2 changed files with 10 additions and 0 deletions

View File

@ -119,6 +119,15 @@ BACKUP_PASSPHRASE={{ .Data.data.backup_passphrase }}
env = true
}
template {
data = <<EOH
CONSUL_HTTP_ADDR={{ env "attr.unique.network.ip-address" }}:8500
EOH
destination = "local/consul.env"
env = true
}
template {
# Build jobs based on node
data = <<EOF

View File

@ -19,6 +19,7 @@ resource "nomad_job" "backups-oneoff" {
enabled = true
vars = {
"nextcloud_backup" = "${local.nextcloud_backup}",
"consul_backup" = file("${path.module}/jobs/consul.hcl"),
}
}