From edec9daf5b1a7a3cecdcaf181c581659f4b8aee3 Mon Sep 17 00:00:00 2001 From: Emmanuel Bilheude Date: Tue, 14 May 2024 14:22:14 +0200 Subject: [PATCH] [fix] (blackblox-exporter) Update hardcoded install path Signed-off-by: Emmanuel Bilheude --- roles/blackbox_exporter/tasks/install.yml | 2 +- roles/blackbox_exporter/templates/blackbox_exporter.service.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/blackbox_exporter/tasks/install.yml b/roles/blackbox_exporter/tasks/install.yml index 19c79f9a..d45519f9 100644 --- a/roles/blackbox_exporter/tasks/install.yml +++ b/roles/blackbox_exporter/tasks/install.yml @@ -78,7 +78,7 @@ - name: Ensure blackbox exporter binary has cap_net_raw capability community.general.capabilities: - path: '/usr/local/bin/blackbox_exporter' + path: "{{ blackbox_exporter_binary_install_dir }}/blackbox_exporter" capability: cap_net_raw+ep state: present when: not ansible_check_mode diff --git a/roles/blackbox_exporter/templates/blackbox_exporter.service.j2 b/roles/blackbox_exporter/templates/blackbox_exporter.service.j2 index fe7b070e..66c0305d 100644 --- a/roles/blackbox_exporter/templates/blackbox_exporter.service.j2 +++ b/roles/blackbox_exporter/templates/blackbox_exporter.service.j2 @@ -11,7 +11,7 @@ User={{ blackbox_exporter_user }} Group={{ blackbox_exporter_group }} PermissionsStartOnly=true ExecReload=/bin/kill -HUP $MAINPID -ExecStart=/usr/local/bin/blackbox_exporter \ +ExecStart={{ blackbox_exporter_binary_install_dir }}/blackbox_exporter \ --config.file={{ blackbox_exporter_config_dir }}/blackbox_exporter.yml \ {% for flag, flag_value in blackbox_exporter_cli_flags.items() -%} --{{ flag }}={{ flag_value }} \