diff --git a/ansible/roles/blackbox-exporter/templates/blackbox.config.j2 b/ansible/roles/blackbox-exporter/templates/blackbox.config.j2 index 9207802..e2a691f 100644 --- a/ansible/roles/blackbox-exporter/templates/blackbox.config.j2 +++ b/ansible/roles/blackbox-exporter/templates/blackbox.config.j2 @@ -1,65 +1,65 @@ -{{ ansible_managed | comment }} - -modules: - http_2xx: - prober: http -{% if inventory_hostname == 'check.home.arpa' %} - http: - preferred_ip_protocol: "ip4" - ip_protocol_fallback: true -{% endif %} - http_2xx_selfsigned: - prober: http - http: - tls_config: - insecure_skip_verify: true - http_post_2xx: - prober: http -{% if inventory_hostname == 'check.home.arpa' %} - http: - method: POST - preferred_ip_protocol: "ip4" - ip_protocol_fallback: true -{% endif %} - tcp_connect: - prober: tcp - smtp_check: - prober: tcp - timeout: 5s - tcp: -{% if inventory_hostname == 'check.home.arpa' %} - preferred_ip_protocol: "ip4" - ip_protocol_fallback: true -{% endif %} - query_response: - - expect: "^220(.*)ESMTP(.*)$" - - send: "EHLO prober\r" - - expect: "^250-STARTTLS" - - send: "STARTTLS\r" - - expect: "^220" - - starttls: true - - send: "EHLO prober\r" - - expect: "^250-AUTH" - - send: "QUIT\r" - imap_check: - prober: tcp - timeout: 5s - tcp: -{% if inventory_hostname == 'check.home.arpa' %} - preferred_ip_protocol: "ip4" - ip_protocol_fallback: true -{% endif %} - query_response: - - expect: "OK.*STARTTLS" - - send: ". STARTTLS" - - expect: "OK" - - starttls: true - - send: ". capability" - - expect: "CAPABILITY IMAP4rev1" - icmp: - prober: icmp -{% if inventory_hostname == 'check.home.arpa' %} - icmp: - preferred_ip_protocol: "ip4" - ip_protocol_fallback: true -{% endif %} +{{ ansible_managed | comment }} + +modules: + http_2xx: + prober: http +{% if inventory_hostname == 'check.home.arpa' %} + http: + preferred_ip_protocol: "ip4" + ip_protocol_fallback: true +{% endif %} + http_2xx_selfsigned: + prober: http + http: + tls_config: + insecure_skip_verify: true + http_post_2xx: + prober: http +{% if inventory_hostname == 'check.home.arpa' %} + http: + method: POST + preferred_ip_protocol: "ip4" + ip_protocol_fallback: true +{% endif %} + tcp_connect: + prober: tcp + smtp_check: + prober: tcp + timeout: 5s + tcp: +{% if inventory_hostname == 'check.home.arpa' %} + preferred_ip_protocol: "ip4" + ip_protocol_fallback: true +{% endif %} + query_response: + - expect: "^220(.*)ESMTP(.*)$" + - send: "EHLO prober\r" + - expect: "^250-STARTTLS" + - send: "STARTTLS\r" + - expect: "^220" + - starttls: true + - send: "EHLO prober\r" + - expect: "^250-AUTH" + - send: "QUIT\r" + imap_check: + prober: tcp + timeout: 5s + tcp: +{% if inventory_hostname == 'check.home.arpa' %} + preferred_ip_protocol: "ip4" + ip_protocol_fallback: true +{% endif %} + query_response: + - expect: "OK.*STARTTLS" + - send: ". STARTTLS" + - expect: "OK" + - starttls: true + - send: ". capability" + - expect: "CAPABILITY IMAP4rev1" + icmp: + prober: icmp +{% if inventory_hostname == 'check.home.arpa' %} + icmp: + preferred_ip_protocol: "ip4" + ip_protocol_fallback: true +{% endif %}