fix: normalize Proxmox endpoint and stop dashboards self-trigger
Deploy Cluster / Terraform (push) Failing after 53s
Deploy Cluster / Ansible (push) Has been skipped

Accept Proxmox API endpoints with or without /api2/json in CI and local
tfvars, and avoid running the dashboards workflow just because its own
workflow file changed during platform migrations.
This commit is contained in:
2026-04-22 03:13:22 +00:00
parent b1dae28aa5
commit 5c53b8e06e
2 changed files with 8 additions and 2 deletions
-1
View File
@@ -7,7 +7,6 @@ on:
paths: paths:
- "ansible/dashboards.yml" - "ansible/dashboards.yml"
- "ansible/roles/observability-content/**" - "ansible/roles/observability-content/**"
- ".gitea/workflows/dashboards.yml"
workflow_dispatch: workflow_dispatch:
env: env:
+8 -1
View File
@@ -14,8 +14,15 @@ terraform {
} }
} }
locals {
proxmox_endpoint_normalized = format(
"%s/",
trimsuffix(replace(trimspace(var.proxmox_endpoint), "/api2/json", ""), "/")
)
}
provider "proxmox" { provider "proxmox" {
endpoint = var.proxmox_endpoint endpoint = local.proxmox_endpoint_normalized
api_token = "${var.proxmox_api_token_id}=${var.proxmox_api_token_secret}" api_token = "${var.proxmox_api_token_id}=${var.proxmox_api_token_secret}"
insecure = var.proxmox_insecure insecure = var.proxmox_insecure
} }