From f64c9cac17d908f8b7be0996485dc6b79b6d0f3c Mon Sep 17 00:00:00 2001 From: Timo Makinen Date: Sat, 21 Jun 2025 16:14:33 +0000 Subject: [PATCH] unbound_exporter: Only listen to primary interface --- roles/unbound_exporter/templates/stunnel.conf.j2 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/roles/unbound_exporter/templates/stunnel.conf.j2 b/roles/unbound_exporter/templates/stunnel.conf.j2 index 8f4aab4..e7fd342 100644 --- a/roles/unbound_exporter/templates/stunnel.conf.j2 +++ b/roles/unbound_exporter/templates/stunnel.conf.j2 @@ -14,9 +14,7 @@ CAfile = {{ tls_certs }}/ca.crt syslog = yes [unbound_exporter] -{% for ip in ansible_all_ipv4_addresses %} -accept = {{ ip }}:9167 -{% endfor %} +accept = {{ network_interfaces[0].ipaddr }}:9167 connect = 127.0.0.1:9167 {% for host in groups['prometheus'] %} checkHost = {{ host }}