From 8a2c6dff8dc8a5da1767619f72dcc53cfc6f439b Mon Sep 17 00:00:00 2001 From: Vasili Karaev Date: Mon, 27 Jul 2020 18:24:51 +0300 Subject: [PATCH] blackbox-exporter: add extra hosts parameter --- monitoring.blackbox-exporter/templates/docker-compose.yml.j2 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/monitoring.blackbox-exporter/templates/docker-compose.yml.j2 b/monitoring.blackbox-exporter/templates/docker-compose.yml.j2 index ad7fc92..ae93f06 100644 --- a/monitoring.blackbox-exporter/templates/docker-compose.yml.j2 +++ b/monitoring.blackbox-exporter/templates/docker-compose.yml.j2 @@ -10,6 +10,9 @@ services: restart: unless-stopped ports: - "{{ blackbox_exporter__port }}:9115" +{% if blackbox_exporter is defined and blackbox_exporter.docker is defined %} + extra_hosts: {{ blackbox_exporter.docker.extra_hosts | default([]) | to_json }} +{% endif %} logging: driver: json-file options: