unbound_exporter: Initial version of role

This commit is contained in:
Timo Makinen 2025-01-24 12:48:36 +00:00
parent d0d9f3430a
commit 74a517f942
2 changed files with 33 additions and 0 deletions

View file

@ -0,0 +1,10 @@
#!/bin/ksh
daemon="/usr/local/sbin/stunnel"
daemon_flags="/etc/unbound_exporter/stunnel.conf"
. /etc/rc.d/rc.subr
rc_reload=NO
rc_cmd $1

View file

@ -0,0 +1,23 @@
setuid = _unboundexporter
setgid = _unboundexporter
sslVersionMin = TLSv1.3
ciphersuites = TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256
curves = X25519:prime256v1:secp384r1
key = {{ tls_private }}/{{ inventory_hostname }}.key
cert = {{ tls_certs }}/{{ inventory_hostname }}.crt
verify = 2
CAfile = {{ tls_certs }}/ca.crt
syslog = yes
[unbound_exporter]
{% for ip in ansible_all_ipv4_addresses %}
accept = {{ ip }}:9167
{% endfor %}
connect = 127.0.0.1:9167
{% for host in groups['prometheus'] %}
checkHost = {{ host }}
{% endfor %}