Add common module managing common services and scripts (act_runner, create/restore backups)
Fix script environment variables Add Fefan configuration Fix gateway services file provisionning through ssh
This commit is contained in:
@@ -100,6 +100,7 @@ module "vm" {
|
||||
|
||||
ssh_public_key = var.ssh_public_key
|
||||
proxmox_host_ip = var.proxmox_host_ip
|
||||
|
||||
cloudinit_config = templatefile(
|
||||
"${path.module}/cloud-init/service.yaml",
|
||||
{
|
||||
@@ -107,7 +108,7 @@ module "vm" {
|
||||
domain = var.domain
|
||||
ssh_key = var.ssh_public_key
|
||||
proxmox_host_ip = var.proxmox_host_ip
|
||||
environment-setup-script = indent(6, file("${path.module}/../common/scripts/env.sh"))
|
||||
|
||||
env-file-content = indent(6, file("${path.module}/.env"))
|
||||
}
|
||||
)
|
||||
@@ -193,6 +194,8 @@ variable "vm_ip_address" {
|
||||
description = "Virtual machine ip"
|
||||
type = string
|
||||
}
|
||||
|
||||
|
||||
```
|
||||
|
||||
#### `modules/apps/<service-name>/output.tf`
|
||||
@@ -237,10 +240,6 @@ package_upgrade: false
|
||||
##### Environment variables for scripts
|
||||
```hcl
|
||||
write_files:
|
||||
- path: /opt/<service-name>/env.sh
|
||||
permissions: "0644"
|
||||
content: |
|
||||
${environment-setup-script}
|
||||
- path: /opt/<service-name>/<service-name>.env
|
||||
permissions: "0644"
|
||||
content: |
|
||||
|
||||
Reference in New Issue
Block a user