prome-grafana tries getting default vars from environment

This commit is contained in:
2026-08-09 15:13:38 +02:00
parent c741a9df3e
commit 3075730019
4 changed files with 7 additions and 6 deletions
@@ -4,3 +4,7 @@ dashboard_folders:
- container
- cache
- server
grafana_password: "{{ lookup('env', 'GRAFANA_PASSWORD') | default('change-me-password', true) }}"
slack_webhook_url: "{{ lookup('env', 'SLACK_WEBHOOK_URL') | default('', true) }}"
discord_webhook_url: "{{ lookup('env', 'DISCORD_WEBHOOK_URL') | default('', true }}"
+1 -1
View File
@@ -84,5 +84,5 @@
networks:
- name: monitoring
env:
GF_SECURITY_ADMIN_PASSWORD: "{{ env_vars.GRAFANA_PASSWORD }}" # Customize the password
GF_SECURITY_ADMIN_PASSWORD: "{{ grafana_password }}" # Customize the password
-3
View File
@@ -1,7 +1,4 @@
---
# ensure we have variables from .env files
- include_tasks: ../roles/env/tasks/main.yml
- include_tasks: monitoring-network.yml
- include_tasks: prometheus.yml
- include_tasks: grafana.yml
@@ -6,11 +6,11 @@ contactPoints:
- uid: beeuk6rhszaiof
type: slack
settings:
url: {{ env_vars.SLACK_WEBHOOK_URL }}
url: {{ slack_webhook_url }}
disableResolveMessage: false
- uid: eewvrxp9d14w0a
type: webhook
settings:
httpMethod: POST
url: {{ env_vars.DISCORD_WEBHOOK_URL }}
url: {{ discord_webhook_url }}
disableResolveMessage: false