Fix consul backup

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

View File

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

View File

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