diff --git a/roles/blackbox_exporter/defaults/main.yml b/roles/blackbox_exporter/defaults/main.yml index b97af9bae..fce5730cc 100644 --- a/roles/blackbox_exporter/defaults/main.yml +++ b/roles/blackbox_exporter/defaults/main.yml @@ -71,7 +71,7 @@ blackbox_exporter_configuration_modules: # validate_answer_rrs: # fail_if_matches_regexp: [test] -# Where to put the blackbox_exporter.yml main configuration file -blackbox_exporter_config_dir: /etc +# Where to put the blackbox.yml main configuration file +blackbox_exporter_config_dir: /etc/blackbox_exporter blackbox_exporter_binary_install_dir: "/usr/local/bin" diff --git a/roles/blackbox_exporter/molecule/alternative/tests/test_alternative.py b/roles/blackbox_exporter/molecule/alternative/tests/test_alternative.py index fcc62672d..e1dc3311f 100644 --- a/roles/blackbox_exporter/molecule/alternative/tests/test_alternative.py +++ b/roles/blackbox_exporter/molecule/alternative/tests/test_alternative.py @@ -10,7 +10,7 @@ @pytest.mark.parametrize("files", [ - "/etc/blackbox_exporter.yml", + "/etc/prometheus/blackbox.yml", "/etc/systemd/system/blackbox_exporter.service", "/usr/local/bin/blackbox_exporter" ]) diff --git a/roles/blackbox_exporter/molecule/default/tests/test_default.py b/roles/blackbox_exporter/molecule/default/tests/test_default.py index 7419277d3..5222975d9 100644 --- a/roles/blackbox_exporter/molecule/default/tests/test_default.py +++ b/roles/blackbox_exporter/molecule/default/tests/test_default.py @@ -10,7 +10,7 @@ @pytest.mark.parametrize("files", [ - "/etc/blackbox_exporter.yml", + "/etc/prometheus/blackbox.yml", "/etc/systemd/system/blackbox_exporter.service", "/usr/local/bin/blackbox_exporter" ]) diff --git a/roles/blackbox_exporter/tasks/configure.yml b/roles/blackbox_exporter/tasks/configure.yml index 447e1c6b6..53b58f305 100644 --- a/roles/blackbox_exporter/tasks/configure.yml +++ b/roles/blackbox_exporter/tasks/configure.yml @@ -12,7 +12,7 @@ - name: Configure blackbox exporter ansible.builtin.template: src: blackbox_exporter.yml.j2 - dest: "{{ blackbox_exporter_config_dir }}/blackbox_exporter.yml" + dest: "{{ blackbox_exporter_config_dir }}/blackbox.yml" owner: root group: "{{ blackbox_exporter_group }}" mode: '0644' diff --git a/roles/blackbox_exporter/templates/blackbox_exporter.service.j2 b/roles/blackbox_exporter/templates/blackbox_exporter.service.j2 index f64e2ca35..9c603e0cf 100644 --- a/roles/blackbox_exporter/templates/blackbox_exporter.service.j2 +++ b/roles/blackbox_exporter/templates/blackbox_exporter.service.j2 @@ -12,7 +12,7 @@ Group={{ blackbox_exporter_group }} PermissionsStartOnly=true ExecReload=/bin/kill -HUP $MAINPID ExecStart={{ blackbox_exporter_binary_install_dir }}/blackbox_exporter \ - --config.file={{ blackbox_exporter_config_dir }}/blackbox_exporter.yml \ + --config.file={{ blackbox_exporter_config_dir }}/blackbox.yml \ {% for flag, flag_value in blackbox_exporter_cli_flags.items() -%} --{{ flag }}={{ flag_value }} \ {% endfor -%}