Skip to content

Commit

Permalink
put blackbox exporter config under its own directory
Browse files Browse the repository at this point in the history
Signed-off-by: Antoine Beaupré <anarcat@debian.org>
  • Loading branch information
anarcat committed Sep 30, 2023
1 parent 5f57309 commit 1225d28
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions roles/blackbox_exporter/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -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"
])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
])
Expand Down
2 changes: 1 addition & 1 deletion roles/blackbox_exporter/tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 -%}
Expand Down

0 comments on commit 1225d28

Please sign in to comment.