From 1a29a0100521b1a0935f61e6e652233c95d01cb9 Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Sun, 12 Feb 2023 11:13:27 +0200 Subject: [PATCH] add variable --- templates/prometheus.yml.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/prometheus.yml.erb b/templates/prometheus.yml.erb index 2fec727..be3e5a8 100644 --- a/templates/prometheus.yml.erb +++ b/templates/prometheus.yml.erb @@ -1,5 +1,6 @@ <% require 'yaml' -%> -<%= if @configuration +<% configuration = scope.lookupvar('::prometheus::configuration') -%> +<%= if configuration configuration.to_yaml().gsub(/source_labels: ".+?"/) { |x| x.gsub('"', '') } end -%>