From 2b2fc16dc61c6790874c598bb8361e259edeeed4 Mon Sep 17 00:00:00 2001 From: Oleg Klyuchkin Date: Mon, 27 Jan 2025 11:55:30 +0300 Subject: [PATCH] fix: :white_check_mark: fix configuration logic for consul exporter Signed-off-by: Oleg Klyuchkin --- .../consul_exporter/templates/consul_exporter.service.j2 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/roles/consul_exporter/templates/consul_exporter.service.j2 b/roles/consul_exporter/templates/consul_exporter.service.j2 index ef7e4334..ec3c0b5c 100644 --- a/roles/consul_exporter/templates/consul_exporter.service.j2 +++ b/roles/consul_exporter/templates/consul_exporter.service.j2 @@ -26,15 +26,23 @@ ExecStart={{ consul_exporter_binary_install_dir }}/consul_exporter \ {% endif %} {% if consul_exporter_health_summary %} --consul.health-summary \ +{% else %} + --no-consul.health-summary {% endif %} {% if consul_exporter_agent_only %} --consul.agent-only \ +{% else %} + --no-consul.agent-only \ {% endif %} {% if consul_exporter_allow_stale %} --consul.allow_stale \ +{% else %} + --no-consul.allow_stale \ {% endif %} {% if consul_exporter_require_consistent %} --consul.require_consistent \ +{% else %} + --no-consul.require_consistent \ {% endif %} '--web.listen-address={{ consul_exporter_web_listen_address }}' \ '--web.telemetry-path={{ consul_exporter_web_telemetry_path }}' \