Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Make config installation dir configurable #173

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions roles/blackbox_exporter/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,6 @@ blackbox_exporter_configuration_modules:
# preferred_ip_protocol: ip6
# validate_answer_rrs:
# fail_if_matches_regexp: [test]

# Where to put the blackbox_exporter.yml main configuration file
blackbox_exporter_conf_dir: /etc
tvenieris marked this conversation as resolved.
Show resolved Hide resolved
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: /etc/blackbox_exporter.yml
dest: "{{ blackbox_exporter_conf_dir }}/blackbox_exporter.yml"
owner: blackbox-exp
group: blackbox-exp
mode: 0644
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Group=blackbox-exp
PermissionsStartOnly=true
ExecReload=/bin/kill -HUP $MAINPID
ExecStart=/usr/local/bin/blackbox_exporter \
--config.file=/etc/blackbox_exporter.yml \
--config.file={{ blackbox_exporter_conf_dir }}/blackbox_exporter.yml \
{% for flag, flag_value in blackbox_exporter_cli_flags.items() -%}
--{{ flag }}={{ flag_value }} \
{% endfor -%}
Expand Down